mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 10:37:16 +01:00
Made superuser able to have a separate "superuser character" in order to be able to have also test-characters without privileges.
This commit is contained in:
parent
bbdf2e0896
commit
7581d65cb3
4 changed files with 31 additions and 23 deletions
|
|
@ -259,9 +259,10 @@ class LockHandler(object):
|
|||
get_player method (this sits on serversessions, in some rare cases where a check is done
|
||||
before the login process has yet been fully finalized)
|
||||
"""
|
||||
self.lock_bypass = ((hasattr(obj, "is_superuser") and obj.is_superuser)
|
||||
or (hasattr(obj, "player") and hasattr(obj.player, "is_superuser") and obj.player.is_superuser)
|
||||
or (hasattr(obj, "get_player") and (not obj.get_player() or obj.get_player().is_superuser)))
|
||||
self.lock_bypass = (hasattr(obj, "is_superuser") and obj.is_superuser
|
||||
or ((hasattr(obj, "get_attribute") and obj.get_attribute("_superuser_character"))
|
||||
and ((hasattr(obj, "player") and hasattr(obj.player, "is_superuser") and obj.player.is_superuser)
|
||||
or (hasattr(obj, "get_player") and (not obj.get_player() or obj.get_player().is_superuser)))))
|
||||
|
||||
def add(self, lockstring, log_obj=None):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue