public interface Permission extends Cloneable
group
or a user
and his assigned
groups.
The user "admin" has always the permissions as specified in CAN_EVERYTHING
, a project admin has at least
the permissions as specified in PROJECT_ADMIN_PERMISSIONS
.Modifier and Type | Field and Description |
---|---|
static int |
CAN_APPEND_FOLDER
Append (new) folder nodes permission flag.
|
static int |
CAN_APPEND_LEAF
Append (new) leaf nodes permission flag.
|
static int |
CAN_CHANGE
Data change permission flag.
|
static int |
CAN_CHANGE_PERMISSION
Permission to change permissions.
|
static int |
CAN_DELETE_FOLDER
Delete folder node permission flag.
|
static int |
CAN_DELETE_LEAF
Delete folder permission flag.
|
static int |
CAN_EVERYTHING
Combination of all permission flags (sum or bitwise or).
|
static int |
CAN_META_CHANGE
Meta data change permission flag.
|
static int |
CAN_META_SEE
Meta data visibility (and read) permission flag.
|
static int |
CAN_READ
Data read permission flag.
|
static int |
CAN_RELEASE
Releas node permission flag.
|
static int |
CAN_SEE
Tree visibility permission flag.
|
static int[] |
PERMISSIONS
A summary of all permissions.
|
static int |
PROJECT_ADMIN_PERMISSIONS
Combination of permission flags for project admins.
|
Modifier and Type | Method and Description |
---|---|
void |
addPermissionListener(PermissionListener permissionListener)
Adds the given
permission listener to be notified on permission change events. |
Permission |
allow(int p)
Grants the given permission.
|
boolean |
canAppendFolder()
Returns
true if the current user is allowed to append folders to the underlying element . |
boolean |
canAppendLeaf()
Returns
true if the current user is allowed to append leaf elements to the underlying element . |
boolean |
canChange()
Returns
true if the current user is allowed to change the underlying element . |
boolean |
canChangePermission()
Returns
true if the current user is allowed to change permissions of the underlying element . |
boolean |
canDelete()
Returns
true if the current user is allowed to delete the underlying element . |
boolean |
canDeleteFolder()
Returns
true if the current user is allowed to delete folders from the underlying element . |
boolean |
canDeleteLeaf()
Returns
true if the current user is allowed to delete leaf elements from the underlying element . |
boolean |
canMetaChange()
Returns
true if the current user is allowed to change meta data of the underlying element . |
boolean |
canMetaSee()
Returns
true if the current user is allowed to see meta data of the underlying element . |
boolean |
canRead()
Returns
true if the current user is allowed to read the underlying element . |
boolean |
canRelease()
Returns
true if the current user is allowed to release the underlying element . |
boolean |
canSee()
Returns
true if the current user is allowed to see the underlying element . |
Object |
clone() |
Permission |
forbid(int p)
Revokes the given permission.
|
StoreElement |
getStoreElement()
Returns the underlying element.
|
boolean |
isAllowed(int p)
Check if a single permission is granted
|
void |
removePermissionListener(PermissionListener permissionListener)
Removes the given
permission listener . |
static final int CAN_SEE
static final int CAN_READ
static final int CAN_CHANGE
static final int CAN_APPEND_FOLDER
static final int CAN_APPEND_LEAF
static final int CAN_DELETE_FOLDER
static final int CAN_DELETE_LEAF
static final int CAN_CHANGE_PERMISSION
static final int CAN_RELEASE
static final int CAN_META_SEE
static final int CAN_META_CHANGE
static final int CAN_EVERYTHING
static final int PROJECT_ADMIN_PERMISSIONS
static final int[] PERMISSIONS
Permission allow(int p)
Permission forbid(int p)
boolean isAllowed(int p)
p
- true
if the current user is the super admin (login "admin") or this permission is granted.boolean canSee()
true
if the current user is allowed to see the underlying element
.true
if the current user is allowed to see the underlying element
.boolean canRead()
true
if the current user is allowed to read the underlying element
.true
if the current user is allowed to read the underlying element
.boolean canChange()
true
if the current user is allowed to change the underlying element
.true
if the current user is allowed to change the underlying element
.boolean canAppendLeaf()
true
if the current user is allowed to append leaf elements to the underlying element
.true
if the current user is allowed to append leaf elements to the underlying element
.boolean canAppendFolder()
true
if the current user is allowed to append folders to the underlying element
.true
if the current user is allowed to append folders to the underlying element
.boolean canDelete()
true
if the current user is allowed to delete the underlying element
.true
if the current user is allowed to delete the underlying element
.boolean canDeleteLeaf()
true
if the current user is allowed to delete leaf elements from the underlying element
.true
if the current user is allowed to delete leaf elements from the underlying element
.boolean canDeleteFolder()
true
if the current user is allowed to delete folders from the underlying element
.true
if the current user is allowed to delete folders from the underlying element
.boolean canChangePermission()
true
if the current user is allowed to change permissions of the underlying element
.true
if the current user is allowed to change permissions of the underlying element
.boolean canRelease()
true
if the current user is allowed to release the underlying element
.true
if the current user is allowed to release the underlying element
.boolean canMetaSee()
true
if the current user is allowed to see meta data of the underlying element
.true
if the current user is allowed to see meta data of the underlying element
.boolean canMetaChange()
true
if the current user is allowed to change meta data of the underlying element
.true
if the current user is allowed to change meta data of the underlying element
.StoreElement getStoreElement()
Object clone()
void addPermissionListener(PermissionListener permissionListener)
permission listener
to be notified on permission change events.permissionListener
- The listener to be notified.void removePermissionListener(PermissionListener permissionListener)
permission listener
.permissionListener
- The listener to be removed.Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210307