Added Character-level quelling possibilities to superuser. This makes the superuser quelling completely in line with normal quelling for other permission levels. It also removes the need for the special _superuser_character bypass used before (the migration no longer creates it an initial_setup won't either).

This commit is contained in:
Griatch 2013-05-14 14:53:08 +02:00
parent 77a0b47859
commit f00053710c
5 changed files with 30 additions and 33 deletions

View file

@ -259,7 +259,6 @@ 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)
"""
#print "_superuser_character:", hasattr(obj, "get_attribute") and obj.get_attribute("_superuser_character")
self.lock_bypass = hasattr(obj, "is_superuser") and obj.is_superuser
def add(self, lockstring, log_obj=None):
@ -363,9 +362,10 @@ class LockHandler(object):
"""
if self.reset_flag:
# on-demand cache rebuild
# rebuild cache, either directly or next call
self._cache_locks(self.obj.lock_storage)
self.reset_flag = False
self.cache_lock_bypass(self.obj)
try:
# check if the lock should be bypassed (e.g. superuser status)