From 33000a55f643bf0e63432a66a9806f421cb3955b Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 19 Feb 2017 09:25:21 +0100 Subject: [PATCH] Have CmdPerm check the 'edit' locktype when caller is a player instead of 'control' (which is not defined on players). Resolves #1223. --- evennia/commands/default/admin.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/evennia/commands/default/admin.py b/evennia/commands/default/admin.py index a8b218962d..9befacd327 100644 --- a/evennia/commands/default/admin.py +++ b/evennia/commands/default/admin.py @@ -495,9 +495,10 @@ class CmdPerm(COMMAND_DEFAULT_CLASS): return # we supplied an argument on the form obj = perm - - if not obj.access(caller, 'control'): - caller.msg("You are not allowed to edit this object's permissions.") + locktype = "edit" if playermode else "control" + if not obj.access(caller, locktype): + caller.msg("You are not allowed to edit this %s's permissions." % + ("player" if playermode else "object")) return cstring = ""