Skip to content

Commit daac7f7

Browse files
committed
Updated rules to reject if the slug is an acl
1 parent 5d1dec6 commit daac7f7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/acl-checker.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,15 @@ class ACLChecker {
5050
resource = rdf.sym(ACLChecker.getDirectory(this.resource))
5151
}
5252
// If this is an ACL, Control mode must be present for any operations
53-
if (this.isAcl(this.resource) || this.isAcl(decodeURIComponent(this.slug))) {
53+
if (this.isAcl(this.resource)) {
5454
mode = 'Control'
5555
resource = rdf.sym(this.resource.substring(0, this.resource.length - this.suffix.length))
5656
}
57+
// If the slug is an acl, reject
58+
if (this.isAcl(decodeURIComponent(this.slug))) {
59+
this.aclCached[cacheKey] = Promise.resolve(false)
60+
return this.aclCached[cacheKey]
61+
}
5762
const directory = acl.isContainer ? rdf.sym(ACLChecker.getDirectory(acl.acl)) : null
5863
const aclFile = rdf.sym(acl.acl)
5964
const agent = user ? rdf.sym(user) : null

0 commit comments

Comments
 (0)