public class ClassSecurityCheck extends AbstractSecurityCheck
ClassAuthorizationStrategy
to test for instantiation rights. But you can use it yourself
to for any kind of action. Note that errorpages should not be outfitted with a securitycheck such
as this that checks for instantiation.ClassAuthorizationStrategy
,
Serialized FormConstructor and Description |
---|
ClassSecurityCheck(Class<?> clazz)
Constructs a new securitycheck for a class
|
Modifier and Type | Method and Description |
---|---|
Class<?> |
getClazz()
The class to check against.
|
boolean |
isActionAuthorized(WaspAction action)
Checks if the user is authorized for the action.
|
boolean |
isAuthenticated()
Redirects to the
WaspAuthorizationStrategy.isClassAuthenticated(Class) . |
getActionFactory, getLoginPage, getStrategy, isActionAuthorized
public ClassSecurityCheck(Class<?> clazz)
clazz
- the class to use in the checkIllegalArgumentException
- if the clazz is nullpublic Class<?> getClazz()
public boolean isActionAuthorized(WaspAction action)
action
- the action(s) like render or enable.org.apache.wicket.RestartResponseAtInterceptPageException
- if the user is not authenticated.ISecurityCheck.isActionAuthorized(org.wicketstuff.security.actions.WaspAction)
,
WaspApplication.getLoginPage()
,
WaspAuthorizationStrategy.isClassAuthorized(Class, WaspAction)
public boolean isAuthenticated()
WaspAuthorizationStrategy.isClassAuthenticated(Class)
.ISecurityCheck.isAuthenticated()
Copyright © 2015. All rights reserved.