类 AbstractSecurityController

java.lang.Object
com.iplatform.base.AbstractController
com.iplatform.base.AbstractSecurityController
所有已实现的接口:
org.springframework.beans.factory.InitializingBean
直接已知子类:
AbstractFileOperateSpiController

public abstract class AbstractSecurityController extends AbstractController
获得当前登录用户认证信息。

 1.如果你的控制器必须在用户认证之后才能操作,就必须继承该对象,请参考: AbstractSecurityController

 2.如果你的控制器没有权限控制,则只需要集成AbstractController即可,
 请参考: AbstractController
 
作者:
时克英
  • 构造器详细资料

    • AbstractSecurityController

      public AbstractSecurityController()
  • 方法详细资料

    • validatePasswordRule

      protected String validatePasswordRule(String originPassword)
      验证密码是否符合平台政策。 // * @param encryptPassword 前端修改的密码(密文),RSA加密,后台要解密的
      参数:
      originPassword - 原始明文密码
      返回:
      返回错误提示,返回空表示成功
    • acquireSecurityUserProperties

      protected SecurityUserProperties acquireSecurityUserProperties()
    • loginAsWorkflowRole

      @Deprecated protected void loginAsWorkflowRole()
      已过时。
      以流程角色登录获取权限,activiti7专用,后续会废弃。
    • isSupervisor

      protected boolean isSupervisor()
      判断当前登录用户是否超级管理员。
      返回:
    • getCurrentUserRoleIdList

      public List<String> getCurrentUserRoleIdList()
      返回当前用户具有的角色集合,注意:这里面会有权限使用的特定角色,如:

      ROLE_SUPERVISOR, ROLE_USER, ROLE_ADMIN 等。

           其他的是系统角色管理的ID,因此数据库通过角色集合查询菜单并不影响结果。
       
      返回:
    • getCurrentUserPrincipal

      public com.walker.web.UserPrincipal<S_user_core> getCurrentUserPrincipal()
    • getCurrentDataScope

      protected String getCurrentDataScope(String menuId)
      返回用户指定菜单的权限标识(是否存在),如果不存在返回空。
      参数:
      menuId - 对应功能菜单ID
      返回:
    • getCurrentUser

      public S_user_core getCurrentUser()
    • getCurrentUserId

      public long getCurrentUserId()
    • encryptPassword

      public String encryptPassword(String password)
      返回加密后的密文
      参数:
      password - 明文密码
      返回:
    • matchesPassword

      public boolean matchesPassword(String rawPassword, String encodedPassword)
      比较提供的明文密码是否与加密的密码相同。
      参数:
      rawPassword - 明文原始密码
      encodedPassword - 加密后的密码
      返回: