API change: Added no_superuser_bypass kwarg to obj.access, channel.access and player.access methods, to make the call consistent with the full lockhandler.check call. This allows the cmdhandler to use access() to check the 'call' locktype and thus make it available for overloading if so desired. Resolves #752.

This commit is contained in:
Griatch 2015-06-01 20:32:52 +02:00
parent ef1e336339
commit 8e134af019
5 changed files with 47 additions and 25 deletions

View file

@ -200,7 +200,7 @@ def get_and_merge_cmdsets(caller, session, player, obj,
local_obj_cmdsets = \
yield [lobj.cmdset.current for lobj in local_objlist
if (lobj.cmdset.current and
lobj.locks.check(caller, 'call', no_superuser_bypass=True))]
lobj.access(caller, access_type='call', no_superuser_bypass=True))]
for cset in local_obj_cmdsets:
#This is necessary for object sets, or we won't be able to
# separate the command sets from each other in a busy room. We