Comparison

mod_compat_roles/mod_compat_roles.lua @ 5582:825c6fb76c48

Multiple modules: Update for split prosody:user role (prosody 082c7d856e61)
author Matthew Wild <mwild1@gmail.com>
date Thu, 29 Jun 2023 15:58:33 +0100
parent 5099:f03f4ec859a3
child 5898:f8b9095f7862
comparison
equal deleted inserted replaced
5581:df483d9056f5 5582:825c6fb76c48
31 -- permissions[host][role_name][permission_name] = is_permitted 31 -- permissions[host][role_name][permission_name] = is_permitted
32 local permissions = {}; 32 local permissions = {};
33 33
34 local role_inheritance = { 34 local role_inheritance = {
35 ["prosody:operator"] = "prosody:admin"; 35 ["prosody:operator"] = "prosody:admin";
36 ["prosody:admin"] = "prosody:user"; 36 ["prosody:admin"] = "prosody:member";
37 ["prosody:user"] = "prosody:restricted"; 37 ["prosody:member"] = "prosody:registered";
38 ["prosody:registered"] = "prosody:guest";
39
40 -- COMPAT
41 ["prosody:user"] = "prosody:registered";
38 }; 42 };
39 43
40 local function role_may(host, role_name, permission) 44 local function role_may(host, role_name, permission)
41 local host_roles = permissions[host]; 45 local host_roles = permissions[host];
42 if not host_roles then 46 if not host_roles then