|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Permission
A permission is belongs to a role which a user has. If the user has a role which contains a permission, the user is allow to perform actions which require that permission.
Permissions are declared within a class, usually via @link org.benow.security.SecurityAdministrator#createPermission(Class, String)
| Nested Class Summary | |
|---|---|
static interface |
Permission.AnonymousAccess
Annotation to indicate that Anonymous users can invoke specific methods. |
static interface |
Permission.AnyUserAccess
Annotation to indicate that any user can invoke the method. |
static interface |
Permission.RequiresPermission
Indicates that a method requires a certain permission to be executed/discovered. |
static interface |
Permission.RestrictOnField
Field within a param that is used to identify a restriction. |
| Method Summary | |
|---|---|
void |
assertPermission()
Assert this permission, throwing security exception if no permission. |
java.lang.Class |
getDeclarator()
Gets the class in which this permission is declared. |
java.lang.String |
getDescription()
|
java.lang.String |
getName()
Gets the name of this permission |
java.lang.String |
getParams()
gets the params for this permission (if any) |
java.util.Collection<Role> |
getRoles()
gets the roles which contain this permission |
boolean |
hasPermission()
Does the current user have this permission? |
void |
setParams(java.lang.String params)
sets the params for this permission |
| Method Detail |
|---|
java.lang.Class getDeclarator()
java.lang.String getName()
java.lang.String getDescription()
java.util.Collection<Role> getRoles()
java.lang.String getParams()
void setParams(java.lang.String params)
params -
void assertPermission()
throws java.lang.SecurityException
java.lang.SecurityExceptionboolean hasPermission()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||