Software /
code /
prosody
Comparison
util/roles.lua @ 12746:7eabf8d78978
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.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 07 Oct 2022 16:58:08 +0100 |
parent | 12647:a661292d074a |
child | 12748:7b9de8109a90 |
comparison
equal
deleted
inserted
replaced
12745:2cbf0e9314ff | 12746:7eabf8d78978 |
---|---|
28 if policy ~= nil then | 28 if policy ~= nil then |
29 return policy; | 29 return policy; |
30 end | 30 end |
31 end | 31 end |
32 end | 32 end |
33 return false; | 33 return nil; |
34 end | 34 end |
35 end | 35 end |
36 | 36 |
37 local permissions_key = {}; | 37 local permissions_key = {}; |
38 | 38 |