aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-10-07 16:58:08 +0100
committerMatthew Wild <mwild1@gmail.com>2022-10-07 16:58:08 +0100
commitd6863b51b94b1a9e5e4cf8ad18a5804807dffe8f (patch)
treea042c738cf913b5bec3c3684134e7bfb3340da32 /util
parent01e03f483760c6f0ff7c6f15fe9cd6b6a54ee97b (diff)
downloadprosody-d6863b51b94b1a9e5e4cf8ad18a5804807dffe8f.tar.gz
prosody-d6863b51b94b1a9e5e4cf8ad18a5804807dffe8f.zip
util.roles: Return nil if the role has no explicit policy (fixes inheritance)
Previously, if the first inherited role had no opinion, it returned false and prevented further consultation of other inherited roles. This bug was found thanks to the implementation of missing test cases identified through mutation testing.
Diffstat (limited to 'util')
-rw-r--r--util/roles.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/roles.lua b/util/roles.lua
index 831ce6ae..a38faa58 100644
--- a/util/roles.lua
+++ b/util/roles.lua
@@ -30,7 +30,7 @@ local function _new_may(permissions, inherited_mays)
end
end
end
- return false;
+ return nil;
end
end