Fixing an issue discovered by test case.

This commit is contained in:
mike12345567 2021-02-26 10:19:06 +00:00
parent 7427eb82c1
commit acba31d29d
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ exports.doesHaveResourcePermission = (
) => { ) => {
// set foundSub to not subResourceId, incase there is no subResource // set foundSub to not subResourceId, incase there is no subResource
let foundMain = false, let foundMain = false,
foundSub = !subResourceId foundSub = false
for (let [resource, level] of Object.entries(permissions)) { for (let [resource, level] of Object.entries(permissions)) {
const levels = getAllowedLevels(level) const levels = getAllowedLevels(level)
if (resource === resourceId && levels.indexOf(permLevel) !== -1) { if (resource === resourceId && levels.indexOf(permLevel) !== -1) {