Skip to content

Commit

Permalink
Check if users are managers and translators first, then admins (mozil…
Browse files Browse the repository at this point in the history
  • Loading branch information
mathjazz authored Oct 17, 2024
1 parent 8c301bb commit 8656973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pontoon/base/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ def user_locale_role(self, locale):
def user_status(self, locale):
if self.username == "Imported":
return ("", "")
if self.is_superuser:
return ("ADMIN", "Admin")
if self in locale.managers_group.user_set.all():
return ("MNGR", "Manager")
if self in locale.translators_group.user_set.all():
return ("TRNSL", "Translator")
if self.is_superuser:
return ("ADMIN", "Admin")
if self.date_joined >= timezone.now() - relativedelta(months=3):
return ("NEW", "New User")
return ("", "")
Expand Down

0 comments on commit 8656973

Please sign in to comment.