@Component public class NamespaceSecurityHelper extends Object
| Constructor and Description |
|---|
NamespaceSecurityHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkPermission(Object object,
NamespacePermissionEnum[] permissions)
Checks the current user's permissions against the given object which may represent a single or multiple namespaces.
|
void |
checkPermission(String namespace,
NamespacePermissionEnum[] permissions)
Checks the current user's permissions against the given namespace.
|
org.springframework.security.access.AccessDeniedException |
getAccessDeniedException(List<org.springframework.security.access.AccessDeniedException> accessDeniedExceptions)
Constructs a new access denied exception by concatenating the given list of exceptions.
|
Set<String> |
getAuthorizedNamespaces(NamespacePermissionEnum... permissions)
Gets a set of namespace codes which the current user is authorized for the given permissions.
|
public void checkPermission(Object object, NamespacePermissionEnum[] permissions)
object - The string or collection of strings which represents the namespacepermissions - The set of permissions the current user must have for the given namespace(s)public void checkPermission(String namespace, NamespacePermissionEnum[] permissions)
namespace - The namespacepermissions - The permissions the current user must have for the given namespacepublic org.springframework.security.access.AccessDeniedException getAccessDeniedException(List<org.springframework.security.access.AccessDeniedException> accessDeniedExceptions)
accessDeniedExceptions - List of exceptions to concatenatepublic Set<String> getAuthorizedNamespaces(NamespacePermissionEnum... permissions)
permissions - List of permissions to queryCopyright © 2019. All rights reserved.