public class DefaultPermissionEnforcer extends Object implements PermissionEnforcer
| Constructor and Description |
|---|
DefaultPermissionEnforcer(UserManager userManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
enforceAdmin()
Verifies that the current security context has sufficient authorisation to perform administration tasks.
|
void |
enforceAuthenticated()
Verifies that the current user is authenticated.
|
void |
enforceSystemAdmin()
Verifies that the current security context has sufficient authorisation to perform system administration tasks.
|
boolean |
isAdmin()
Tests whether the current security context has sufficient authorisation to perform administration tasks.
|
boolean |
isAuthenticated() |
boolean |
isSystemAdmin()
Tests whether the current security context has sufficient authorisation to perform system administration tasks.
|
public DefaultPermissionEnforcer(UserManager userManager)
public void enforceAdmin()
throws AuthorisationException
PermissionEnforcerenforceAdmin in interface PermissionEnforcerAuthorisationException - if the current security context lacks the required authorisationNotAuthenticatedException - if the current security context lacks the required authorisation and
the current user is not authenticatedpublic void enforceAuthenticated()
throws AuthorisationException
PermissionEnforcerenforceAuthenticated in interface PermissionEnforcerNotAuthenticatedException - if the user is not authenticatedAuthorisationExceptionpublic void enforceSystemAdmin()
throws AuthorisationException
PermissionEnforcerenforceSystemAdmin in interface PermissionEnforcerAuthorisationException - if the current security context lacks the required authorisationNotAuthenticatedException - if the current security context lacks the required authorisation and
the current user is not authenticatedpublic boolean isAdmin()
PermissionEnforcerisAdmin in interface PermissionEnforcertrue if the current security context has sufficient authorisation to perform administration
tasks, otherwise falsepublic boolean isAuthenticated()
isAuthenticated in interface PermissionEnforcertrue if the current user is authenticatedpublic boolean isSystemAdmin()
PermissionEnforcerisSystemAdmin in interface PermissionEnforcertrue if the current security context has sufficient authorisation to perform system
administration tasks, otherwise falseCopyright © 2018 Atlassian. All rights reserved.