mirror of
https://github.com/evennia/evennia.git
synced 2026-03-26 01:36:32 +01:00
Don't allow those with 'edit' access to obj to change the 'control' lock.
This commit is contained in:
parent
15b04666a5
commit
cde9986be8
1 changed files with 8 additions and 1 deletions
|
|
@ -1853,9 +1853,16 @@ class CmdLock(ObjManipCommand):
|
|||
obj = caller.search(objname)
|
||||
if not obj:
|
||||
return
|
||||
if not (obj.access(caller, 'control') or obj.access(caller, "edit")):
|
||||
has_control_access = obj.access(caller, 'control')
|
||||
if access_type == 'control' and not has_control_access:
|
||||
# only allow to change 'control' access if you have 'control' access already
|
||||
caller.msg("You need 'control' access to change this type of lock.")
|
||||
return
|
||||
|
||||
if not has_control_access or obj.access(caller, "edit"):
|
||||
caller.msg("You are not allowed to do that.")
|
||||
return
|
||||
|
||||
lockdef = obj.locks.get(access_type)
|
||||
|
||||
if lockdef:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue