Superusers are also staff
This commit is contained in:
parent
c02380a1e4
commit
50249f2ba2
@ -70,7 +70,7 @@ class OAuthMiddleware(MiddlewareMixin):
|
||||
user.discriminator = user_json['discriminator']
|
||||
user.email = user_json['email']
|
||||
user.avatar_id = user_json['avatar']
|
||||
user.is_superuser = f"{user.username}#{user.discriminator}" in settings.SUPERUSERS
|
||||
user.is_staff = user.is_superuser = f"{user.username}#{user.discriminator}" in settings.SUPERUSERS
|
||||
user.save()
|
||||
request.session['user'] = user.discord_id
|
||||
return user
|
||||
|
Loading…
Reference in New Issue
Block a user