Trunk: Merged the Devel-branch (branches/griatch) into /trunk. This constitutes a major refactoring of Evennia. Development will now continue in trunk. See the wiki and the past posts to the mailing list for info. /Griatch
This commit is contained in:
parent
df29defbcd
commit
f83c2bddf8
222 changed files with 22304 additions and 14371 deletions
100
src/permissions/default_permissions.py
Normal file
100
src/permissions/default_permissions.py
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
"""
|
||||
Setup the permission hierarchy and groups. This is
|
||||
read once during server startup. Further groups and
|
||||
permissions have to be added manually.
|
||||
|
||||
To set up your own permission scheme, have
|
||||
PERMISSION_SETUP_MODULE in game/settings point to
|
||||
a module of your own. This module must define two global
|
||||
dictionaries PERMS and GROUPS.
|
||||
|
||||
PERMS contains all permissions defined at server start
|
||||
on the form {key:desc, key:desc, ...}
|
||||
GROUPS gathers permissions (which must have been
|
||||
previously created as keys in PERMS) into clusters
|
||||
on the form {groupname: [key, key, ...], ...}
|
||||
"""
|
||||
|
||||
# Defining all permissions.
|
||||
PERMS = [
|
||||
'emit',
|
||||
'wall',
|
||||
|
||||
'teleport',
|
||||
'setobjalias',
|
||||
'wipe',
|
||||
'set',
|
||||
'cpattr',
|
||||
'mvattr',
|
||||
'find',
|
||||
'create',
|
||||
'copy',
|
||||
'open',
|
||||
'link',
|
||||
'unlink',
|
||||
'dig',
|
||||
'desc',
|
||||
'destroy',
|
||||
'examine',
|
||||
'typeclass',
|
||||
'debug',
|
||||
|
||||
'batchcommands',
|
||||
'batchcodes',
|
||||
|
||||
'ccreate',
|
||||
'cdesc',
|
||||
'tell',
|
||||
'time',
|
||||
'list',
|
||||
|
||||
'ps',
|
||||
'stats',
|
||||
|
||||
'reload',
|
||||
'py',
|
||||
'listscripts',
|
||||
'listcmdsets',
|
||||
'listobjects',
|
||||
'boot',
|
||||
'delplayer',
|
||||
'newpassword',
|
||||
'home',
|
||||
'service',
|
||||
'shutdown',
|
||||
'perm',
|
||||
'sethelp',
|
||||
]
|
||||
|
||||
# Permission Groups
|
||||
# Permission groups clump the previously defined permissions into
|
||||
# larger chunks. {groupname: [permissionkey,... ]}
|
||||
|
||||
GROUPS = {
|
||||
"Immortals": PERMS,
|
||||
"Wizards": [perm for perm in PERMS
|
||||
if perm not in ['shutdown',
|
||||
'py',
|
||||
'reload',
|
||||
'service',
|
||||
'perm',
|
||||
'batchcommands',
|
||||
'batchcodes']],
|
||||
|
||||
"Builders": [perm for perm in PERMS
|
||||
if perm not in ['shutdown',
|
||||
'py',
|
||||
'reload',
|
||||
'service',
|
||||
'perm',
|
||||
'batchcommands',
|
||||
'batchcodes',
|
||||
|
||||
'wall',
|
||||
'boot',
|
||||
'delplayer',
|
||||
'newpassword']],
|
||||
"PlayerHelpers": ['tell',
|
||||
'sethelp', 'ccreate', 'use_channels'],
|
||||
"Players": ['tell', 'ccreate', 'use_channels']
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue