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 boolean |
currentUserHasAdminRights(PlatformSecurityInterceptor platformSecurityInterceptor,
String[] additionalAdminUsers) |
static boolean |
currentUserHasAuthority(String authority) |
static boolean |
currentUserHasGroup(String group) |
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() |
static Set<String> |
getCurrentUserGroupKeys() |
static String |
getCurrentUserId() |
public static org.springframework.security.core.GrantedAuthority createTenantAuthority(String tenantId)
public static org.springframework.security.core.GrantedAuthority createGroupAuthority(String groupKey)
public static String getCurrentUserId()
public static String getCurrentTenantId()
public 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)
public static boolean currentUserHasGroup(String group)
public static boolean currentUserHasAuthority(String authority)
Copyright © 2019. All rights reserved.