Skip to content

Commit 0f9b42f

Browse files
author
nicola
committed
first 10 tests pass, missed an allowOrigin
1 parent 10d6933 commit 0f9b42f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎acl.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,13 @@ ACL.prototype.allowMode = function (mode, userId, aclGraph, accessType, pathUri,
209209
debug("Found " + accessType + " policy for <" + mode + ">");
210210

211211
var accessTypeStatements = aclGraph.each(modeElem, ns.acl(accessType), aclGraph.sym(pathUri));
212+
213+
console.log("-- accessTypeStatements", accessTypeStatements.length)
212214
async.some(accessTypeStatements, function(accessTypeElem, next) {
213215
var origins = aclGraph.each(modeElem, ns.acl("origin"), undefined);
216+
217+
console.log("-- ACL origins, ", acl.origin, origins)
218+
console.log("-- ACL origins lengths ", acl.origin.length, origins.length)
214219
if (acl.origin.length > 0 && origins.length > 0) {
215220
debug("Origin set to: " + rdfVocab.brack(acl.origin));
216221
async.some(origins, function(originsElem, done) {
@@ -221,7 +226,7 @@ ACL.prototype.allowMode = function (mode, userId, aclGraph, accessType, pathUri,
221226
}, next);
222227
} else {
223228
debug("No origin found, moving on.");
224-
next();
229+
acl.allowOrigin(mode, userId, aclGraph, modeElem, next);
225230
}
226231
}, found);
227232
}, function (allowed) {

0 commit comments

Comments
 (0)