Class SecurityUtils
java.lang.Object
com.flowable.core.spring.security.SecurityUtils
- Author:
- Filip Hrisafov, Joram Barrez
-
Method Summary
Modifier and TypeMethodDescriptionstatic GrantedAuthority
createGroupAuthority
(String groupKey) static GrantedAuthority
createTenantAuthority
(String tenantId) static GrantedAuthority
createUserDefinitionAuthority
(String userDefinitionKey) static boolean
currentUserHasAdminRights
(PlatformSecurityInterceptor platformSecurityInterceptor, String[] additionalAdminUsers) static boolean
currentUserHasAuthority
(String authority) Deprecated.static boolean
currentUserHasGroup
(String group) Deprecated.use theSecurityScope.getGroupKeys()
obtained viagetCurrentUserSecurityScope()
to check insteadstatic boolean
currentUserIsSuperAdmin
(PlatformSecurityInterceptor platformSecurityInterceptor, String[] additionalAdminUsers) A super admin is an admin user in the default tenant.static boolean
currentUserIsTenantAdmin
(PlatformSecurityInterceptor platformSecurityInterceptor, String[] additionalAdminUsers, String tenantId) A tenant admin is an admin user in its own tenant.extractGroupsFromAuthorities
(Collection<? extends GrantedAuthority> authorities) static String
extractTenantIdFromAuthorities
(Collection<? extends GrantedAuthority> authorities) static String
extractUserDefinitionKeyFromAuthorities
(Collection<? extends GrantedAuthority> authorities) static String
Deprecated.use theSecurityScope.getTenantId()
obtained viagetCurrentUserSecurityScope()
insteadDeprecated.use theSecurityScope.getGroupKeys()
obtained viagetCurrentUserSecurityScope()
insteadstatic String
Deprecated.use theSecurityScope.getUserId()
obtained viagetCurrentUserSecurityScope()
insteadstatic SecurityScope
static SecurityScope
static SecurityScope
getSecurityScope
(Authentication authentication) static void
setSecurityScopeProvider
(SecurityScopeProvider securityScopeProvider)
-
Method Details
-
setSecurityScopeProvider
-
createTenantAuthority
-
createGroupAuthority
-
createUserDefinitionAuthority
-
extractUserDefinitionKeyFromAuthorities
public static String extractUserDefinitionKeyFromAuthorities(Collection<? extends GrantedAuthority> authorities) -
extractTenantIdFromAuthorities
public static String extractTenantIdFromAuthorities(Collection<? extends GrantedAuthority> authorities) -
extractGroupsFromAuthorities
public static Set<String> extractGroupsFromAuthorities(Collection<? extends GrantedAuthority> authorities) -
getCurrentUserId
Deprecated.use theSecurityScope.getUserId()
obtained viagetCurrentUserSecurityScope()
instead -
getCurrentTenantId
Deprecated.use theSecurityScope.getTenantId()
obtained viagetCurrentUserSecurityScope()
instead -
currentUserHasAdminRights
public static boolean currentUserHasAdminRights(PlatformSecurityInterceptor platformSecurityInterceptor, String[] additionalAdminUsers) -
currentUserIsTenantAdmin
public static boolean currentUserIsTenantAdmin(PlatformSecurityInterceptor platformSecurityInterceptor, String[] additionalAdminUsers, String tenantId) A tenant admin is an admin user in its own tenant. -
currentUserIsSuperAdmin
public static boolean currentUserIsSuperAdmin(PlatformSecurityInterceptor platformSecurityInterceptor, String[] additionalAdminUsers) A super admin is an admin user in the default tenant. -
getCurrentUserGroupKeys
Deprecated.use theSecurityScope.getGroupKeys()
obtained viagetCurrentUserSecurityScope()
instead -
currentUserHasGroup
Deprecated.use theSecurityScope.getGroupKeys()
obtained viagetCurrentUserSecurityScope()
to check instead -
currentUserHasAuthority
Deprecated.use theSecurityScope.hasAuthority(String)
obtained viagetCurrentUserSecurityScope()
instead -
getCurrentUserSecurityScope
-
getCurrentUserSecurityScopeSafe
-
getSecurityScope
-
SecurityScope.hasAuthority(String)
obtained viagetCurrentUserSecurityScope()
instead