From d6863b51b94b1a9e5e4cf8ad18a5804807dffe8f Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 7 Oct 2022 16:58:08 +0100 Subject: 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. --- util/roles.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/roles.lua') 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 -- cgit v1.2.3