Update for role changes in Prosody

See https://hg.prosody.im/trunk/rev/082c7d856e61
This commit is contained in:
Kim Alvefur
2023-09-19 18:29:24 +02:00
parent 0f1e76e38c
commit 2cdcf7f282
3 changed files with 4 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ class EditUserForm(BaseForm):
_l("Access Level"),
choices=[
("prosody:restricted", _("Limited")),
("prosody:user", _l("Normal user")),
("prosody:registered", _l("Normal user")),
("prosody:admin", _l("Administrator")),
],
)
@@ -131,7 +131,7 @@ async def edit_user(localpart: str) -> typing.Union[werkzeug.Response, str]:
if target_user_info.roles:
form.role.data = target_user_info.roles[0]
else:
form.role.data = "prosody:user"
form.role.data = "prosody:registered"
return await render_template(
"admin_edit_user.html",

View File

@@ -29,7 +29,7 @@ from . import xmpputil
from .xmpputil import split_jid
SCOPE_DEFAULT = "prosody:user"
SCOPE_DEFAULT = "prosody:registered"
SCOPE_ADMIN = "prosody:admin"

View File

@@ -3,7 +3,7 @@
{% macro access_level_description(role, caller=None) %}
{%- if role == "prosody:restricted" -%}
{% trans %}Limited users can interact with users on the same Snikket service and be members of circles.{% endtrans %}
{%- elif role == "prosody:user" -%}
{%- elif role == "prosody:registered" -%}
{% trans %}Like limited users and can also interact with users on other Snikket services.{% endtrans %}
{%- elif role == "prosody:admin" -%}
{% trans %}Like normal users and can access the admin panel in the web portal.{% endtrans %}