You've already forked snikket-web-portal
Update for role changes in Prosody
See https://hg.prosody.im/trunk/rev/082c7d856e61
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -29,7 +29,7 @@ from . import xmpputil
|
||||
from .xmpputil import split_jid
|
||||
|
||||
|
||||
SCOPE_DEFAULT = "prosody:user"
|
||||
SCOPE_DEFAULT = "prosody:registered"
|
||||
SCOPE_ADMIN = "prosody:admin"
|
||||
|
||||
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user