Software /
code /
prosody
Diff
plugins/mod_authz_internal.lua @ 11472:c32753ceb0f0
mod_authz_internal: add support for setting roles of a local user
author | Jonas Schäfer <jonas@wielicki.name> |
---|---|
date | Mon, 22 Mar 2021 21:24:43 +0100 |
parent | 10659:8f95308c3c45 |
child | 11474:8fba807e5256 |
line wrap: on
line diff
--- a/plugins/mod_authz_internal.lua Mon Mar 22 10:05:41 2021 +0100 +++ b/plugins/mod_authz_internal.lua Mon Mar 22 21:24:43 2021 +0100 @@ -12,6 +12,11 @@ return role_store:get(user); end +function set_user_roles(user, roles) + role_store:set(user, roles) + return true; +end + function get_jid_roles(jid) if admin_jids:contains(jid) then return admin_role; @@ -19,4 +24,6 @@ return nil; end - +function set_jid_roles(jid) + return false; +end