mirror of
https://github.com/evennia/evennia.git
synced 2026-04-07 00:45:22 +02:00
Moved permissions into a the tag system as a separate handler. Permissions still don't work quite right yet.
This commit is contained in:
parent
2acff2d1ab
commit
06e858b3f6
21 changed files with 1003 additions and 389 deletions
|
|
@ -146,13 +146,13 @@ def perm(accessing_obj, accessed_obj, *args, **kwargs):
|
|||
|
||||
try:
|
||||
perm = args[0].lower()
|
||||
perms_object = [p.lower() for p in accessing_obj.permissions]
|
||||
perms_object = [p.lower() for p in accessing_obj.permissions.all()]
|
||||
except (AttributeError, IndexError):
|
||||
return False
|
||||
|
||||
if utils.inherits_from(accessing_obj, "src.objects.objects.Object") and accessing_obj.player:
|
||||
player = accessing_obj.player
|
||||
perms_player = [p.lower() for p in player.permissions]
|
||||
perms_player = [p.lower() for p in player.permissions.all()]
|
||||
is_quell = player.get_attribute("_quell")
|
||||
|
||||
if perm in _PERMISSION_HIERARCHY:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue