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.GrantedAuthority
createGroupAuthority(java.lang.String groupKey)
static org.springframework.security.core.GrantedAuthority
createTenantAuthority(java.lang.String tenantId)
static org.springframework.security.core.GrantedAuthority
createUserDefinitionAuthority(java.lang.String userDefinitionKey)
static boolean
currentUserHasAdminRights(PlatformSecurityInterceptor platformSecurityInterceptor, java.lang.String[] additionalAdminUsers)
static boolean
currentUserHasAuthority(java.lang.String authority)
Deprecated.use theSecurityScope.hasAuthority(String)
obtained viagetCurrentUserSecurityScope()
insteadstatic boolean
currentUserHasGroup(java.lang.String group)
Deprecated.use theSecurityScope.getGroupKeys()
obtained viagetCurrentUserSecurityScope()
to check insteadstatic boolean
currentUserIsSuperAdmin(PlatformSecurityInterceptor platformSecurityInterceptor, java.lang.String[] additionalAdminUsers)
A super admin is an admin user in the default tenant.static boolean
currentUserIsTenantAdmin(PlatformSecurityInterceptor platformSecurityInterceptor, java.lang.String[] additionalAdminUsers, java.lang.String tenantId)
A tenant admin is an admin user in its own tenant.static java.lang.String
getCurrentTenantId()
Deprecated.use theSecurityScope.getTenantId()
obtained viagetCurrentUserSecurityScope()
insteadstatic java.util.Set<java.lang.String>
getCurrentUserGroupKeys()
Deprecated.use theSecurityScope.getGroupKeys()
obtained viagetCurrentUserSecurityScope()
insteadstatic java.lang.String
getCurrentUserId()
Deprecated.use theSecurityScope.getUserId()
obtained viagetCurrentUserSecurityScope()
insteadstatic SecurityScope
getCurrentUserSecurityScope()
static void
setSecurityScopeProvider(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
-