Skip to content

Commit ef2a790

Browse files
kjetilkrubensworks
authored andcommitted
Add test for origin and user
1 parent 629b041 commit ef2a790

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/integration/acl-oidc-test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,19 @@ describe('ACL with WebID+OIDC over HTTP', function () {
339339
})
340340
})
341341

342+
it('agent should not be able to access test directory when origin is invalid even with user',
343+
function (done) {
344+
var options = createOptions('/origin/test-folder/', 'user1')
345+
options.headers.origin = origin2
346+
347+
request.head(options, function (error, response, body) {
348+
assert.equal(error, null)
349+
assert.equal(response.statusCode, 403)
350+
assert.equal(response.statusMessage, 'Origin Unauthorized')
351+
done()
352+
})
353+
})
354+
342355
after(function () {
343356
rm('/accounts-acl/tim.localhost/origin/test-folder/.acl')
344357
})

0 commit comments

Comments
 (0)