Class SecurityUtils
- java.lang.Object
-
- com.flowable.core.spring.security.SecurityUtils
-
public class SecurityUtils extends Object
- Author:
- Filip Hrisafov, Joram Barrez
-
-
Method Summary
-
-
-
Method Detail
-
setSecurityScopeProvider
public static void setSecurityScopeProvider(SecurityScopeProvider securityScopeProvider)
-
createTenantAuthority
public static GrantedAuthority createTenantAuthority(String tenantId)
-
createGroupAuthority
public static GrantedAuthority createGroupAuthority(String groupKey)
-
createUserDefinitionAuthority
public static GrantedAuthority createUserDefinitionAuthority(String userDefinitionKey)
-
extractUserDefinitionKeyFromAuthorities
public static String extractUserDefinitionKeyFromAuthorities(Collection<? extends GrantedAuthority> authorities)
-
extractTenantIdFromAuthorities
public static String extractTenantIdFromAuthorities(Collection<? extends GrantedAuthority> authorities)
-
getCurrentUserId
@Deprecated public static String getCurrentUserId()
Deprecated.use theSecurityScope.getUserId()
obtained viagetCurrentUserSecurityScope()
instead
-
getCurrentTenantId
@Deprecated public static String 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 public static Set<String> getCurrentUserGroupKeys()
Deprecated.use theSecurityScope.getGroupKeys()
obtained viagetCurrentUserSecurityScope()
instead
-
currentUserHasGroup
@Deprecated public static boolean currentUserHasGroup(String group)
Deprecated.use theSecurityScope.getGroupKeys()
obtained viagetCurrentUserSecurityScope()
to check instead
-
currentUserHasAuthority
@Deprecated public static boolean currentUserHasAuthority(String authority)
Deprecated.use theSecurityScope.hasAuthority(String)
obtained viagetCurrentUserSecurityScope()
instead
-
getCurrentUserSecurityScope
public static SecurityScope getCurrentUserSecurityScope()
-
getCurrentUserSecurityScopeSafe
public static SecurityScope getCurrentUserSecurityScopeSafe()
-
getSecurityScope
public static SecurityScope getSecurityScope(Authentication authentication)
-
-