public class AuthorisationManagerImpl extends Object implements AuthorisationManager, Startable
Constructor and Description |
---|
AuthorisationManagerImpl(PermissionManager permissionManager,
com.atlassian.plugin.PluginAccessor pluginAccessor,
WebworkPluginSecurityServiceHelper webworkPluginSecurityServiceHelper,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
boolean |
authoriseForLogin(ApplicationUser user,
javax.servlet.http.HttpServletRequest httpServletRequest)
Called to ask whether a user (non null always) is authorised to perform the given request as a login event
|
boolean |
authoriseForRole(ApplicationUser user,
javax.servlet.http.HttpServletRequest httpServletRequest,
String role)
Called to ask whether a user (non null always) is authorised to perform the given request as a login event
|
Set<String> |
getRequiredRoles(javax.servlet.http.HttpServletRequest httpServletRequest)
Gets the set of role strings that are examined by Seraph to decide if a user is authorised to execute a request.
|
void |
onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event) |
void |
onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event) |
void |
start()
This method will be called after the plugin system is fully initialised and all components added to the
dependency injection framework.
|
public AuthorisationManagerImpl(PermissionManager permissionManager, com.atlassian.plugin.PluginAccessor pluginAccessor, WebworkPluginSecurityServiceHelper webworkPluginSecurityServiceHelper, com.atlassian.event.api.EventPublisher eventPublisher)
public void start() throws Exception
Startable
public void onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
public void onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
public boolean authoriseForLogin(@Nonnull ApplicationUser user, javax.servlet.http.HttpServletRequest httpServletRequest)
AuthorisationManager
authoriseForLogin
in interface AuthorisationManager
user
- a non null userhttpServletRequest
- the request in playpublic Set<String> getRequiredRoles(javax.servlet.http.HttpServletRequest httpServletRequest)
AuthorisationManager
getRequiredRoles
in interface AuthorisationManager
httpServletRequest
- the request in playpublic boolean authoriseForRole(@Nullable ApplicationUser user, javax.servlet.http.HttpServletRequest httpServletRequest, String role)
AuthorisationManager
authoriseForRole
in interface AuthorisationManager
user
- a possibly null userhttpServletRequest
- the request in playrole
- one or more of the roles that was given out during AuthorisationManager.getRequiredRoles(javax.servlet.http.HttpServletRequest)
Copyright © 2002-2015 Atlassian. All Rights Reserved.