Compare commits

..

2 Commits

Author SHA1 Message Date
Matthew Wild
61c71b2145 admin: Inline restricted user role name
It was a variable only for the benefit of translators while disabled.
2021-11-09 17:00:59 +00:00
Matthew Wild
6b35e9a259 admin: Show restricted user role in the UI 2021-11-09 16:40:50 +00:00
2 changed files with 1 additions and 7 deletions

View File

@@ -5,5 +5,4 @@ hsluv~=0.0.2
flask-babel~=1.0 flask-babel~=1.0
email-validator~=1.1 email-validator~=1.1
environ-config~=20.0 environ-config~=20.0
wtforms~=2.3
typing-extensions typing-extensions

View File

@@ -63,9 +63,6 @@ async def users() -> str:
) )
_LIMITED_ROLE_NAME = _("Limited")
class EditUserForm(BaseForm): class EditUserForm(BaseForm):
localpart = wtforms.StringField( localpart = wtforms.StringField(
_l("Login name"), _l("Login name"),
@@ -78,9 +75,7 @@ class EditUserForm(BaseForm):
role = wtforms.RadioField( role = wtforms.RadioField(
_l("Access Level"), _l("Access Level"),
choices=[ choices=[
# NOTE: enable this only after something has been done which ("prosody:restricted", _("Limited")),
# actually enforces the described restrictions :).
# ("prosody:restricted", _LIMITED_ROLE_NAME),
("prosody:normal", _l("Normal user")), ("prosody:normal", _l("Normal user")),
("prosody:admin", _l("Administrator")), ("prosody:admin", _l("Administrator")),
], ],