# HG changeset patch # User Kim Alvefur # Date 1674857185 -3600 # Node ID 8474a3b80200b8aec9f80420311c2ca1b660536a # Parent 51f7d72a56c298eb8832580da92cf1d8a6b9975d mod_firewall: Fix 'is_admin' internal dependency rule #1797 (thanks diane) Looks like the boolean logic was inverted here. Instead, for now, simply check if is_admin is there. It is deprecated in trunk and was briefly removed before being brought back with a 'deprecated' warning as part of the new roles and permissions work. Making this dependency conditioned on the existence of the underlying function should make it work until it actually goes away for real. diff -r 51f7d72a56c2 -r 8474a3b80200 mod_firewall/mod_firewall.lua --- a/mod_firewall/mod_firewall.lua Wed Jan 25 20:39:13 2023 +0100 +++ b/mod_firewall/mod_firewall.lua Fri Jan 27 23:06:25 2023 +0100 @@ -184,7 +184,7 @@ group_contains = { global_code = [[local group_contains = module:depends("groups").group_contains]]; }; - is_admin = features:contains("permissions") and { global_code = [[local is_admin = require "core.usermanager".is_admin;]]} or nil; + is_admin = require"core.usermanager".is_admin and { global_code = [[local is_admin = require "core.usermanager".is_admin;]]} or nil; get_jid_role = require "core.usermanager".get_jid_role and { global_code = [[local get_jid_role = require "core.usermanager".get_jid_role;]] } or nil; core_post_stanza = { global_code = [[local core_post_stanza = prosody.core_post_stanza;]] }; zone = { global_code = function (zone)