Fixing an issue discovered by test case.
This commit is contained in:
parent
7427eb82c1
commit
acba31d29d
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue