Change permission strings so Immortals->Developer, Wizards->Admin, Builders->Builder, PlayerHelper->Helper, Players->Player, Guests->Guest. Made perm() and pperm() lock function accept both the plural and singular form (so both Admin and Admins work). Still lacking a data migration for updating an existing database to the new setup.

This commit is contained in:
Griatch 2017-02-17 23:25:00 +01:00
parent edc092bfc4
commit 0bd47f0c52
23 changed files with 119 additions and 118 deletions

View file

@ -276,7 +276,7 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
builders.
"""
if self.locks.check_lockstring(looker, "perm(Builders)"):
if self.locks.check_lockstring(looker, "perm(Builder)"):
return "{}(#{})".format(self.name, self.id)
return self.name
@ -973,15 +973,15 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
# controller, for example)
self.locks.add(";".join([
"control:perm(Immortals)", # edit locks/permissions, delete
"examine:perm(Builders)", # examine properties
"control:perm(Developer)", # edit locks/permissions, delete
"examine:perm(Builder)", # examine properties
"view:all()", # look at object (visibility)
"edit:perm(Wizards)", # edit properties/attributes
"delete:perm(Wizards)", # delete object
"edit:perm(Admin)", # edit properties/attributes
"delete:perm(Admin)", # delete object
"get:all()", # pick up object
"call:true()", # allow to call commands on this object
"tell:perm(Wizards)", # allow emits to this object
"puppet:pperm(Immortals)"])) # lock down puppeting only to staff by default
"tell:perm(Admin)", # allow emits to this object
"puppet:pperm(Developer)"])) # lock down puppeting only to staff by default
def basetype_posthook_setup(self):
"""