public abstract class AbstractSwarmStrategy extends ClassAuthorizationStrategy
Modifier and Type | Field and Description |
---|---|
protected LoginContainer |
loginContainer |
MESSAGE_KEY
Constructor and Description |
---|
AbstractSwarmStrategy() |
AbstractSwarmStrategy(Class<? extends ISecureComponent> secureClass) |
Modifier and Type | Method and Description |
---|---|
Subject |
getSubject()
The currently logged in subject, note that at any time there is at most 1 subject logged in.
|
boolean |
hasPermission(Permission permission)
Performs the actual permission check at the
Hive . |
abstract boolean |
hasPermission(Permission permission,
Subject subject) |
boolean |
isClassAuthenticated(Class<?> clazz)
Performs the authentication check.
|
boolean |
isClassAuthorized(Class<?> clazz,
WaspAction action)
Performs the actual authorization check on the component class.
|
boolean |
isComponentAuthenticated(org.apache.wicket.Component component)
Performs the authentication check.
|
boolean |
isComponentAuthorized(org.apache.wicket.Component component,
WaspAction action)
Performs the actual authorization check on the component.
|
boolean |
isModelAuthenticated(org.apache.wicket.model.IModel<?> model,
org.apache.wicket.Component component)
Performs the authentication check.
|
boolean |
isModelAuthorized(ISecureModel<?> model,
org.apache.wicket.Component component,
WaspAction action)
Checks if some action is granted on the model.
|
destroy, getClassChecks, getClassChecks, getExceptionMessage, isInstantiationAuthorized
createMessageSource, get, getActionFactory, getMessageSource, getMessageSource, getSecurityCheck, isActionAuthorized, isUserAuthenticated, login, logMessage, logMessage, logMessage, logMessages, logoff, removeMessageSource, setStrategyResolver
protected LoginContainer loginContainer
public AbstractSwarmStrategy()
public AbstractSwarmStrategy(Class<? extends ISecureComponent> secureClass)
public abstract boolean hasPermission(Permission permission, Subject subject)
public Subject getSubject()
public boolean hasPermission(Permission permission)
Hive
. This is equal to using
hasPermission(Permission, Subject)
with getSubject()
permission
- the permission to verifySecurityException
- if the permission is nullhasPermission(Permission, Subject)
public boolean isClassAuthenticated(Class<?> clazz)
WaspAuthorizationStrategy
isClassAuthenticated
in class WaspAuthorizationStrategy
clazz
- the class of the wicket componentWaspAuthorizationStrategy.isClassAuthenticated(java.lang.Class)
public boolean isClassAuthorized(Class<?> clazz, WaspAction action)
WaspAuthorizationStrategy
isClassAuthorized
in class WaspAuthorizationStrategy
clazz
- typically a componentaction
- the action to checkWaspAuthorizationStrategy.isClassAuthorized(java.lang.Class,
org.wicketstuff.security.actions.WaspAction)
public boolean isComponentAuthenticated(org.apache.wicket.Component component)
WaspAuthorizationStrategy
isComponentAuthenticated
in class WaspAuthorizationStrategy
component
- the wicket componentWaspAuthorizationStrategy.isComponentAuthenticated(org.apache.wicket.Component)
public boolean isComponentAuthorized(org.apache.wicket.Component component, WaspAction action)
WaspAuthorizationStrategy
isComponentAuthorized
in class WaspAuthorizationStrategy
WaspAuthorizationStrategy.isComponentAuthorized(org.apache.wicket.Component,
org.wicketstuff.security.actions.WaspAction)
public boolean isModelAuthenticated(org.apache.wicket.model.IModel<?> model, org.apache.wicket.Component component)
WaspAuthorizationStrategy
isModelAuthenticated
in class WaspAuthorizationStrategy
model
- the (secure) modelcomponent
- the component owning the modelWaspAuthorizationStrategy.isModelAuthenticated(org.apache.wicket.model.IModel,
org.apache.wicket.Component)
public boolean isModelAuthorized(ISecureModel<?> model, org.apache.wicket.Component component, WaspAction action)
SwarmModel
s are preferred any
ISecureModel
can be used, in that case it uses the ISecureModel#toString()
method as the name of the DataPermission
isModelAuthorized
in class WaspAuthorizationStrategy
model
- the modelcomponent
- component 'owning' the model if availableaction
- the action to checkWaspAuthorizationStrategy.isModelAuthorized(ISecureModel,
Component, WaspAction)
Copyright © 2015. All rights reserved.