Changeset

10695:52886aad9ee1

usermanager: Fix traceback when checking admin status of host-only JIDs (fixes #1508)
author Matthew Wild <mwild1@gmail.com>
date Thu, 19 Mar 2020 14:12:40 +0000
parents 10694:0cda5d597607
children 10696:9a8a55a026e4
files core/usermanager.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/usermanager.lua	Thu Mar 19 00:10:15 2020 +0100
+++ b/core/usermanager.lua	Thu Mar 19 14:12:40 2020 +0000
@@ -149,7 +149,7 @@
 
 	local authz_provider = (host ~= "*" and hosts[host].authz) or global_authz_provider;
 
-	if actor_host == host then -- Local user
+	if actor_user and actor_host == host then -- Local user
 		roles = authz_provider.get_user_roles(actor_user);
 	else -- Remote user/JID
 		roles = authz_provider.get_jid_roles(jid);