public class SecurityUtils extends Object
Modifier and Type | Method and Description |
---|---|
static org.springframework.security.core.GrantedAuthority |
createGroupAuthority(String groupKey) |
static org.springframework.security.core.GrantedAuthority |
createTenantAuthority(String tenantId) |
static org.springframework.security.core.GrantedAuthority |
createUserDefinitionAuthority(String userDefinitionKey) |
static boolean |
currentUserHasAdminRights(PlatformSecurityInterceptor platformSecurityInterceptor,
String[] additionalAdminUsers) |
static boolean |
currentUserHasAuthority(String authority)
Deprecated.
use the
SecurityScope.hasAuthority(String) obtained via getCurrentUserSecurityScope() instead |
static boolean |
currentUserHasGroup(String group)
Deprecated.
use the
SecurityScope.getGroupKeys() obtained via getCurrentUserSecurityScope() to check instead |
static 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.
|
static String |
getCurrentTenantId()
Deprecated.
use the
SecurityScope.getTenantId() obtained via getCurrentUserSecurityScope() instead |
static Set<String> |
getCurrentUserGroupKeys()
Deprecated.
use the
SecurityScope.getGroupKeys() obtained via getCurrentUserSecurityScope() instead |
static String |
getCurrentUserId()
Deprecated.
use the
SecurityScope.getUserId() obtained via getCurrentUserSecurityScope() instead |
static com.flowable.core.common.api.security.SecurityScope |
getCurrentUserSecurityScope() |
static void |
setSecurityScopeProvider(com.flowable.core.common.api.security.SecurityScopeProvider securityScopeProvider) |
public static void setSecurityScopeProvider(com.flowable.core.common.api.security.SecurityScopeProvider securityScopeProvider)
public static org.springframework.security.core.GrantedAuthority createTenantAuthority(String tenantId)
public static org.springframework.security.core.GrantedAuthority createGroupAuthority(String groupKey)
public static org.springframework.security.core.GrantedAuthority createUserDefinitionAuthority(String userDefinitionKey)
@Deprecated public static String getCurrentUserId()
SecurityScope.getUserId()
obtained via getCurrentUserSecurityScope()
instead@Deprecated public static String getCurrentTenantId()
SecurityScope.getTenantId()
obtained via getCurrentUserSecurityScope()
insteadpublic static boolean currentUserHasAdminRights(PlatformSecurityInterceptor platformSecurityInterceptor, String[] additionalAdminUsers)
public static boolean currentUserIsTenantAdmin(PlatformSecurityInterceptor platformSecurityInterceptor, String[] additionalAdminUsers, String tenantId)
public static boolean currentUserIsSuperAdmin(PlatformSecurityInterceptor platformSecurityInterceptor, String[] additionalAdminUsers)
@Deprecated public static Set<String> getCurrentUserGroupKeys()
SecurityScope.getGroupKeys()
obtained via getCurrentUserSecurityScope()
instead@Deprecated public static boolean currentUserHasGroup(String group)
SecurityScope.getGroupKeys()
obtained via getCurrentUserSecurityScope()
to check instead@Deprecated public static boolean currentUserHasAuthority(String authority)
SecurityScope.hasAuthority(String)
obtained via getCurrentUserSecurityScope()
insteadpublic static com.flowable.core.common.api.security.SecurityScope getCurrentUserSecurityScope()
Copyright © 2019. All rights reserved.