Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
11471:ab03de8e503e | 11472:c32753ceb0f0 |
---|---|
10 return admin_role; | 10 return admin_role; |
11 end | 11 end |
12 return role_store:get(user); | 12 return role_store:get(user); |
13 end | 13 end |
14 | 14 |
15 function set_user_roles(user, roles) | |
16 role_store:set(user, roles) | |
17 return true; | |
18 end | |
19 | |
15 function get_jid_roles(jid) | 20 function get_jid_roles(jid) |
16 if admin_jids:contains(jid) then | 21 if admin_jids:contains(jid) then |
17 return admin_role; | 22 return admin_role; |
18 end | 23 end |
19 return nil; | 24 return nil; |
20 end | 25 end |
21 | 26 |
22 | 27 function set_jid_roles(jid) |
28 return false; | |
29 end |