You've already forked snikket-web-portal
Follow new role scheme in Prosody
Prosody changed its role scheme to only support a single primary role for each user. In addition, the names of the built-in roles have been changed. We thus follow those changes to be compatible with the most recent trunk. One open question is whether we should switch admin -> operator here, too (operator being a server-wide admin), but so far there's no need to.
This commit is contained in:
@@ -885,7 +885,7 @@ class ProsodyClient:
|
||||
localpart: str,
|
||||
*,
|
||||
display_name: typing.Optional[str],
|
||||
roles: typing.Optional[typing.Collection[str]],
|
||||
role: typing.Optional[str],
|
||||
session: aiohttp.ClientSession,
|
||||
) -> None:
|
||||
payload: typing.Dict[str, typing.Any] = {
|
||||
@@ -893,8 +893,8 @@ class ProsodyClient:
|
||||
}
|
||||
if display_name is not None:
|
||||
payload["display_name"] = display_name
|
||||
if roles is not None:
|
||||
payload["roles"] = list(roles)
|
||||
if role is not None:
|
||||
payload["role"] = role
|
||||
|
||||
async with session.put(
|
||||
self._admin_v1_endpoint("/users/{}".format(localpart)),
|
||||
|
||||
Reference in New Issue
Block a user