public interface AdvancedAuthorizationProvider
AuthenticationProvider
, this interface allows an implementation to get at additional information with each call to
hasPermission(Context, Path, String...)
.
In particular, the supplied AdvancedAuthorizationProvider.Context
instance contains the Session
that is calling this provider, allowing the
provider implementation to access authorization-specific content within the repository to determine permissions for other
repository content.
In these cases, calls to the session to access nodes will result in their own calls to
hasPermission(Context, Path, String...)
. Therefore, such implementations need to handle these special
authorization-specific content permissions in an explicit fashion. It is also adviced that such providers cache as much of the
authorization-specifc content as possible, as the hasPermission(Context, Path, String...)
method is called frequently.
Modifier and Type | Interface and Description |
---|---|
static interface |
AdvancedAuthorizationProvider.Context
The context in which the calling session is operating, and which contains session-related information that a provider
implementation may find useful.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasPermission(AdvancedAuthorizationProvider.Context context,
Path absPath,
String... actions)
Determine if the supplied execution context has permission for all of the named actions in the given context.
|
boolean hasPermission(AdvancedAuthorizationProvider.Context context, Path absPath, String... actions)
context
- the context in which the subject is performing the actions on the supplied workspaceabsPath
- the absolute path on which the actions are occurring, or null if the permissions are at the workspace-levelactions
- the list of actions
to checkCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.