Browse Source

display admin stuff to superusers even when they are not server admins

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
bddef1de0c
  1. 2
      pyweb/mumble/models.py

2
pyweb/mumble/models.py

@ -328,6 +328,8 @@ class Mumble( models.Model ):
def isUserAdmin( self, user ): def isUserAdmin( self, user ):
""" Determine if the given user is an admin on this server. """ """ Determine if the given user is an admin on this server. """
if user.is_authenticated(): if user.is_authenticated():
if user.is_superuser:
return True;
try: try:
return self.mumbleuser_set.get( owner=user ).getAdmin(); return self.mumbleuser_set.get( owner=user ).getAdmin();
except MumbleUser.DoesNotExist: except MumbleUser.DoesNotExist:

Loading…
Cancel
Save