Permissions - Archipelago/Wiki GitHub Wiki

Permissions

Each user has a set of permissions that desrcibe what they can and cannot do. They are represented as an integer in which each bit represent a permission. Here are the available permission in version 0.2.0:

Name Value
ADD_ELEMENT 1
EDIT_ELEMENT 2
DELETE_ELEMENT 4
ADD_RELEASE 8
EDIT_RELEASE 16
DELETE_RELEASE 32
ADD_LINK 64
EDIT_LINK 128
DELETE_LINK 256
EDIT_USER 512
DELETE_USER 1024
BAN_USER 2048
EDIT_PERMISSION 4096
GET_CONFIG 8192
EDIT_CONFIG 16384
GARBAGE 32768

User with id 1 has all permissions and he cannot loose them.
Default user permission are defined by configuration variable defaultPermissions, which default value is 73, which means ADD_ELEMENT | ADD_RELEASE | ADD_LINK.