We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a21ef99 commit a6b0dc1Copy full SHA for a6b0dc1
lib/role.js
@@ -36,12 +36,14 @@ module.exports = function(AV) {
36
if (acl === undefined) {
37
var defaultAcl = new AV.ACL();
38
defaultAcl.setPublicReadAccess(true);
39
- acl = defaultAcl;
40
- }
41
- if (!(acl instanceof AV.ACL)) {
+ if(!this.getACL()) {
+ this.setACL(defaultAcl);
+ }
42
+ } else if (!(acl instanceof AV.ACL)) {
43
throw new TypeError('acl must be an instance of AV.ACL');
44
+ } else {
45
+ this.setACL(acl);
46
}
- this.setACL(acl);
47
},
48
49
/**
0 commit comments