Comparison

core/usermanager.lua @ 12656:af315e5b71f0

usermanager: Remove obsolete function from global authz provider
author Matthew Wild <mwild1@gmail.com>
date Thu, 11 Aug 2022 16:56:59 +0100
parent 12654:f3dbbc7655e6
child 12657:1ab845e80fe7
comparison
equal deleted inserted replaced
12655:a5a0783e9241 12656:af315e5b71f0
41 local global_admins = set.new(global_admins_config) / jid_prep; 41 local global_admins = set.new(global_admins_config) / jid_prep;
42 42
43 local admin_role = { ["prosody:admin"] = true }; 43 local admin_role = { ["prosody:admin"] = true };
44 local global_authz_provider = { 44 local global_authz_provider = {
45 get_user_roles = function (user) end; --luacheck: ignore 212/user 45 get_user_roles = function (user) end; --luacheck: ignore 212/user
46 get_jid_roles = function (jid)
47 if global_admins:contains(jid) then
48 return admin_role;
49 end
50 end;
51 get_jids_with_role = function (role) 46 get_jids_with_role = function (role)
52 if role ~= "prosody:admin" then return {}; end 47 if role ~= "prosody:admin" then return {}; end
53 return it.to_array(global_admins); 48 return it.to_array(global_admins);
54 end; 49 end;
55 set_user_roles = function (user, roles) end; -- luacheck: ignore 212 50 set_user_roles = function (user, roles) end; -- luacheck: ignore 212