File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -46,18 +46,19 @@ class ACLChecker {
4646
4747 // Gets the ACL that applies to the resource
4848 getNearestACL ( ) {
49+ const { resource } = this
4950 let isContainer = false
5051 // Create a cascade of reject handlers (one for each possible ACL)
5152 let nearestACL = Promise . reject ( )
5253 for ( const acl of this . getPossibleACLs ( ) ) {
5354 nearestACL = nearestACL . catch ( ( ) => new Promise ( ( resolve , reject ) => {
54- debug ( `Check if ACL exists: ${ acl } ` )
5555 this . fetch ( acl , ( err , graph ) => {
5656 if ( err || ! graph || ! graph . length ) {
57- if ( err ) debug ( `Error reading ${ acl } : ${ err } ` )
5857 isContainer = true
5958 reject ( err )
6059 } else {
60+ const relative = resource . replace ( acl . replace ( / [ ^ / ] + $ / , '' ) , './' )
61+ debug ( `Using ACL ${ acl } for ${ relative } ` )
6162 resolve ( { acl, graph, isContainer } )
6263 }
6364 } )
You can’t perform that action at this time.
0 commit comments