mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fix permissions bug due to class rename.
evennia.objects.objects.Object was renamed to evennia.objects.objects.DefaultObject.
This commit is contained in:
parent
7395a772f9
commit
7347aef9fd
1 changed files with 2 additions and 2 deletions
|
|
@ -89,7 +89,7 @@ _PERMISSION_HIERARCHY = [p.lower() for p in settings.PERMISSION_HIERARCHY]
|
|||
|
||||
def _to_player(accessing_obj):
|
||||
"Helper function. Makes sure an accessing object is a player object"
|
||||
if utils.inherits_from(accessing_obj, "evennia.objects.objects.Object"):
|
||||
if utils.inherits_from(accessing_obj, "evennia.objects.objects.DefaultObject"):
|
||||
# an object. Convert to player.
|
||||
accessing_obj = accessing_obj.player
|
||||
return accessing_obj
|
||||
|
|
@ -158,7 +158,7 @@ def perm(accessing_obj, accessed_obj, *args, **kwargs):
|
|||
except (AttributeError, IndexError):
|
||||
return False
|
||||
|
||||
if utils.inherits_from(accessing_obj, "evennia.objects.objects.Object") and accessing_obj.player:
|
||||
if utils.inherits_from(accessing_obj, "evennia.objects.objects.DefaultObject") and accessing_obj.player:
|
||||
player = accessing_obj.player
|
||||
perms_player = [p.lower() for p in player.permissions.all()]
|
||||
is_quell = player.attributes.get("_quell")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue