public class BasicMethodSecurity extends Object implements MethodSecurity
MethodSecurity which checks method security based
on the RolesAllowed annotations of our implementation methods. To do
this, it is necessary to "unwrap" proxies via the Advised interface.SecuritySystem| Constructor and Description |
|---|
BasicMethodSecurity() |
BasicMethodSecurity(boolean active) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkMethod(Object o,
Method m,
Principal p,
boolean hasPassword)
Throws a
SecurityViolation exception if the given
Principal does not have the proper permissions to execute the
given method. |
boolean |
isActive()
|
void |
setSessionManager(SessionManager sessionManager) |
public BasicMethodSecurity()
public BasicMethodSecurity(boolean active)
public void setSessionManager(SessionManager sessionManager)
public boolean isActive()
isActive in interface MethodSecuritypublic void checkMethod(Object o, Method m, Principal p, boolean hasPassword)
MethodSecuritySecurityViolation exception if the given
Principal does not have the proper permissions to execute the
given method. If MethodSecurity.isActive() returns false, this method may also
throw any RuntimeException to specify that it is not in an active
state.checkMethod in interface MethodSecurityo - Object on which this method will be called.m - Method to be called.p - Principal for which permissions will be checked.hasPassword - flag if the user's session has been authenticated directly
and not via a one-time session id or similar.MethodSecurity.checkMethod(Object, Method, Principal, boolean)
Version: 5.2.1-ice35-b15
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.