# HG changeset patch # User Jonas Schäfer # Date 1616444683 -3600 # Node ID c32753ceb0f039ca0e0a11e21ae2fbfe639df991 # Parent ab03de8e503e2e6d536e308625ca9add8723d277 mod_authz_internal: add support for setting roles of a local user diff -r ab03de8e503e -r c32753ceb0f0 plugins/mod_authz_internal.lua --- 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