streamline use if `self`
This commit is contained in:
parent
01c1656fc2
commit
4ff9a4c2ef
|
@ -395,8 +395,9 @@ module.exports = function(ACL) {
|
|||
*/
|
||||
|
||||
ACL.checkAccessForContext = function(context, callback) {
|
||||
this.resolveRelatedModels();
|
||||
var roleModel = this.roleModel;
|
||||
var self = this;
|
||||
self.resolveRelatedModels();
|
||||
var roleModel = self.roleModel;
|
||||
|
||||
if (!(context instanceof AccessContext)) {
|
||||
context = new AccessContext(context);
|
||||
|
@ -419,9 +420,8 @@ module.exports = function(ACL) {
|
|||
var req = new AccessRequest(modelName, property, accessType, ACL.DEFAULT, methodNames);
|
||||
|
||||
var effectiveACLs = [];
|
||||
var staticACLs = this.getStaticACLs(model.modelName, property);
|
||||
var staticACLs = self.getStaticACLs(model.modelName, property);
|
||||
|
||||
var self = this;
|
||||
this.find({ where: { model: model.modelName, property: propertyQuery,
|
||||
accessType: accessTypeQuery }}, function(err, acls) {
|
||||
if (err) {
|
||||
|
|
Loading…
Reference in New Issue