Skip to content

Commit

Permalink
NGO Hub super-admins should become Super Users
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Oct 1, 2024
1 parent 5ff44d5 commit 3ed5973
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/redirectioneaza/social_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ def common_user_init(sociallogin: SocialLogin) -> UserModel:
if user_role == settings.NGOHUB_ROLE_SUPER_ADMIN:
# A super admin from NGO Hub will become a Django admin
user.groups.add(Group.objects.get(name=RESTRICTED_ADMIN))
user.is_staff = True
user.is_superuser = True
user.save()

return user

Expand Down

0 comments on commit 3ed5973

Please sign in to comment.