Comparison

core/usermanager.lua @ 12683:75f0c69eba71

core.usermanager: Link to docs for new role API to make warning more actionable
author Kim Alvefur <zash@zash.se>
date Sat, 27 Aug 2022 17:01:36 +0200
parent 12667:0278987b8687
child 12905:8473a516004f
comparison
equal deleted inserted replaced
12682:464a22f2751c 12683:75f0c69eba71
232 if strict_deprecate_is_admin then 232 if strict_deprecate_is_admin then
233 log("error", "Attempt to use deprecated is_admin() API: %s", debug.traceback()); 233 log("error", "Attempt to use deprecated is_admin() API: %s", debug.traceback());
234 return false; 234 return false;
235 end 235 end
236 log("warn", "Usage of legacy is_admin() API, which will be disabled in a future build: %s", debug.traceback()); 236 log("warn", "Usage of legacy is_admin() API, which will be disabled in a future build: %s", debug.traceback());
237 log("warn", "See https://prosody.im/doc/developers/permissions about the new permissions API");
237 return legacy_admin_roles[get_jid_role(jid, host)] or false; 238 return legacy_admin_roles[get_jid_role(jid, host)] or false;
238 end 239 end
239 240
240 local function get_users_with_role(role, host) 241 local function get_users_with_role(role, host)
241 if not hosts[host] then return false; end 242 if not hosts[host] then return false; end