resource-access-list
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -72,5 +72,4 @@ 'use strict'; | ||
return modelNameList.find(function (name) { | ||
return nameRe.test(modelNameList); | ||
return nameRe.test(name); | ||
}); | ||
// return resource.charAt(0).toUpperCase() + resource.slice(1, -1) | ||
} | ||
@@ -96,12 +95,13 @@ }, { | ||
return reject(err); | ||
} else if (Number(owner.id) === Number(userId)) { | ||
} else if (!!owner && Number(owner.id) === Number(userId)) { | ||
roles.push('$owner'); | ||
return resolve(roles); | ||
} | ||
return resolve(roles); | ||
}); | ||
} else if (ModelInst && ModelInst.member) { | ||
} | ||
if (ModelInst && ModelInst.member) { | ||
ModelInst.member(function (err, member) { | ||
if (err) { | ||
return reject(err); | ||
} else if (Number(memberId) === Number(member.id)) { | ||
} else if (!!member && Number(member.id) === Number(memberId)) { | ||
roles.push('$member'); | ||
@@ -195,3 +195,3 @@ } | ||
}).catch(function (err) { | ||
console.log(err); | ||
return next(err); | ||
}); | ||
@@ -198,0 +198,0 @@ } else { |
{ | ||
"name": "resource-access-list", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "This is a awesome project", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10917