зеркало из https://github.com/mozilla/pontoon.git
Check if users are managers and translators first, then admins (#3414)
This commit is contained in:
Родитель
8c301bbbcb
Коммит
86569737d1
|
@ -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 ("", "")
|
||||
|
|
Загрузка…
Ссылка в новой задаче