diff options
author | Matthew Wild <mwild1@gmail.com> | 2022-08-17 16:38:53 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2022-08-17 16:38:53 +0100 |
commit | f5768f63c993cee9f7f8e3c89db7e4e3080beab5 (patch) | |
tree | 8de97d71efdbbfbdb54fdd7c0da47c811bb7a183 /plugins/mod_tokenauth.lua | |
parent | 2b0676396dc84dad48735a9e3782bb4f13b36471 (diff) | |
download | prosody-f5768f63c993cee9f7f8e3c89db7e4e3080beab5.tar.gz prosody-f5768f63c993cee9f7f8e3c89db7e4e3080beab5.zip |
mod_authz_internal, and more: New iteration of role API
These changes to the API (hopefully the last) introduce a cleaner separation
between the user's primary (default) role, and their secondary (optional)
roles.
To keep the code sane and reduce complexity, a data migration is needed for
people using stored roles in 0.12. This can be performed with
prosodyctl mod_authz_internal migrate <host>
Diffstat (limited to 'plugins/mod_tokenauth.lua')
-rw-r--r-- | plugins/mod_tokenauth.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_tokenauth.lua b/plugins/mod_tokenauth.lua index 6610036c..85602747 100644 --- a/plugins/mod_tokenauth.lua +++ b/plugins/mod_tokenauth.lua @@ -10,7 +10,7 @@ local function select_role(username, host, role) if role then return prosody.hosts[host].authz.get_role_by_name(role); end - return usermanager.get_user_default_role(username, host); + return usermanager.get_user_role(username, host); end function create_jid_token(actor_jid, token_jid, token_role, token_ttl) |