comparison mod_restrict_xmpp/mod_restrict_xmpp.lua @ 5747:111e970213a0

mod_restrict_xmpp: Fix remaining hard-coded role name
author Matthew Wild <mwild1@gmail.com>
date Thu, 30 Nov 2023 18:05:42 +0000
parents 825c6fb76c48
children 1d0a0d3f9593
comparison
equal deleted inserted replaced
5746:561503e0c0f1 5747:111e970213a0
111 module:default_permission(limited_user_role, "xmpp:account:"..account_property..":read"); 111 module:default_permission(limited_user_role, "xmpp:account:"..account_property..":read");
112 module:default_permission(limited_user_role, "xmpp:account:"..account_property..":write"); 112 module:default_permission(limited_user_role, "xmpp:account:"..account_property..":write");
113 end 113 end
114 end 114 end
115 115
116 module:default_permission("prosody:restricted", "xmpp:account:presence:write"); 116 module:default_permission(limited_user_role, "xmpp:account:presence:write");
117 module:hook("pre-presence/bare", function (event) 117 module:hook("pre-presence/bare", function (event)
118 if not event.to_self then return; end 118 if not event.to_self then return; end
119 local stanza = event.stanza; 119 local stanza = event.stanza;
120 if not module:may("xmpp:account:presence:write", event) then 120 if not module:may("xmpp:account:presence:write", event) then
121 module:log("warn", "Access denied: xmpp:account:presence:write for %s", event.origin.full_jid or event.origin.id); 121 module:log("warn", "Access denied: xmpp:account:presence:write for %s", event.origin.full_jid or event.origin.id);