Class SecurityUtils
java.lang.Object
com.flowable.core.spring.security.SecurityUtils
public class SecurityUtils
extends java.lang.Object
- Author:
- Filip Hrisafov, Joram Barrez
-
Method Summary
Modifier and Type Method Description static org.springframework.security.core.GrantedAuthoritycreateGroupAuthority(java.lang.String groupKey)static org.springframework.security.core.GrantedAuthoritycreateTenantAuthority(java.lang.String tenantId)static org.springframework.security.core.GrantedAuthoritycreateUserDefinitionAuthority(java.lang.String userDefinitionKey)static booleancurrentUserHasAdminRights(PlatformSecurityInterceptor platformSecurityInterceptor, java.lang.String[] additionalAdminUsers)static booleancurrentUserHasAuthority(java.lang.String authority)Deprecated.use theSecurityScope.hasAuthority(String)obtained viagetCurrentUserSecurityScope()insteadstatic booleancurrentUserHasGroup(java.lang.String group)Deprecated.use theSecurityScope.getGroupKeys()obtained viagetCurrentUserSecurityScope()to check insteadstatic booleancurrentUserIsSuperAdmin(PlatformSecurityInterceptor platformSecurityInterceptor, java.lang.String[] additionalAdminUsers)A super admin is an admin user in the default tenant.static booleancurrentUserIsTenantAdmin(PlatformSecurityInterceptor platformSecurityInterceptor, java.lang.String[] additionalAdminUsers, java.lang.String tenantId)A tenant admin is an admin user in its own tenant.static java.lang.StringgetCurrentTenantId()Deprecated.use theSecurityScope.getTenantId()obtained viagetCurrentUserSecurityScope()insteadstatic java.util.Set<java.lang.String>getCurrentUserGroupKeys()Deprecated.use theSecurityScope.getGroupKeys()obtained viagetCurrentUserSecurityScope()insteadstatic java.lang.StringgetCurrentUserId()Deprecated.use theSecurityScope.getUserId()obtained viagetCurrentUserSecurityScope()insteadstatic SecurityScopegetCurrentUserSecurityScope()static voidsetSecurityScopeProvider(SecurityScopeProvider securityScopeProvider)
-
Method Details
-
setSecurityScopeProvider
-
createTenantAuthority
public static org.springframework.security.core.GrantedAuthority createTenantAuthority(java.lang.String tenantId) -
createGroupAuthority
public static org.springframework.security.core.GrantedAuthority createGroupAuthority(java.lang.String groupKey) -
createUserDefinitionAuthority
public static org.springframework.security.core.GrantedAuthority createUserDefinitionAuthority(java.lang.String userDefinitionKey) -
getCurrentUserId
@Deprecated public static java.lang.String getCurrentUserId()Deprecated.use theSecurityScope.getUserId()obtained viagetCurrentUserSecurityScope()instead -
getCurrentTenantId
@Deprecated public static java.lang.String getCurrentTenantId()Deprecated.use theSecurityScope.getTenantId()obtained viagetCurrentUserSecurityScope()instead -
currentUserHasAdminRights
public static boolean currentUserHasAdminRights(PlatformSecurityInterceptor platformSecurityInterceptor, java.lang.String[] additionalAdminUsers) -
currentUserIsTenantAdmin
public static boolean currentUserIsTenantAdmin(PlatformSecurityInterceptor platformSecurityInterceptor, java.lang.String[] additionalAdminUsers, java.lang.String tenantId)A tenant admin is an admin user in its own tenant. -
currentUserIsSuperAdmin
public static boolean currentUserIsSuperAdmin(PlatformSecurityInterceptor platformSecurityInterceptor, java.lang.String[] additionalAdminUsers)A super admin is an admin user in the default tenant. -
getCurrentUserGroupKeys
@Deprecated public static java.util.Set<java.lang.String> getCurrentUserGroupKeys()Deprecated.use theSecurityScope.getGroupKeys()obtained viagetCurrentUserSecurityScope()instead -
currentUserHasGroup
@Deprecated public static boolean currentUserHasGroup(java.lang.String group)Deprecated.use theSecurityScope.getGroupKeys()obtained viagetCurrentUserSecurityScope()to check instead -
currentUserHasAuthority
@Deprecated public static boolean currentUserHasAuthority(java.lang.String authority)Deprecated.use theSecurityScope.hasAuthority(String)obtained viagetCurrentUserSecurityScope()instead -
getCurrentUserSecurityScope
-