aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-12-06 22:23:38 +0100
committerKim Alvefur <zash@zash.se>2021-12-06 22:23:38 +0100
commita45484c1313e25faa7cad4bdc7cd71f1a459f2f4 (patch)
treeccb254a74044726b69d9310a75c236d15663fe60 /plugins
parent022a48a5786c15d92986d5d6ef5f6c83c9206a3c (diff)
downloadprosody-a45484c1313e25faa7cad4bdc7cd71f1a459f2f4.tar.gz
prosody-a45484c1313e25faa7cad4bdc7cd71f1a459f2f4.zip
mod_admin_shell: Only check that local users exist locally
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_admin_shell.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua
index b7800764..98ddc7e3 100644
--- a/plugins/mod_admin_shell.lua
+++ b/plugins/mod_admin_shell.lua
@@ -1335,9 +1335,7 @@ function def_env.user:roles(jid, host, new_roles)
if new_roles == nil then host, new_roles = userhost, host; end
if not prosody.hosts[host] then
return nil, "No such host: "..host;
- elseif not prosody.hosts[userhost] then
- return nil, "No such host: "..userhost;
- elseif not um.user_exists(username, userhost) then
+ elseif prosody.hosts[userhost] and not um.user_exists(username, userhost) then
return nil, "No such user";
end
return um.set_roles(jid, host, coerce_roles(new_roles));