public abstract class PermissionBase extends Object implements Permission
Permission that uses a set of allowed actions to
check| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
allowedActions |
static String |
ANY_ACTION |
| Constructor and Description |
|---|
PermissionBase() |
| Modifier and Type | Method and Description |
|---|---|
PermissionBase |
allow(String... actions) |
PermissionBase |
allow(String action) |
PermissionBase |
allowAny() |
boolean |
equals(Object o) |
Set<String> |
getAllowedActions() |
int |
hashCode() |
boolean |
isAllowed(String action)
Returns true if action execution is allowed
|
void |
setAllowedActions(Set<String> allowedActions) |
String |
toString() |
public static final String ANY_ACTION
public boolean isAllowed(String action)
PermissionisAllowed in interface Permissionaction - the action to executepublic PermissionBase allowAny()
public PermissionBase allow(String action)
public PermissionBase allow(String... actions)
Copyright © 2018 CrafterCMS. All rights reserved.