Skip to content

Commit 672d89e

Browse files
committed
Test that fails when accessTo is set wrong
1 parent 8af45d3 commit 672d89e

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

test/integration/acl-oidc-test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,4 +855,15 @@ describe('ACL with WebID+OIDC over HTTP', function () {
855855
rm('/accounts-acl/tim.localhost/write-acl/default-for-new/test-file.ttl')
856856
})
857857
})
858+
859+
describe('Wrongly set accessTo', function () {
860+
it('user1 should be able to access test directory', function (done) {
861+
var options = createOptions('/dot-acl/', 'user1')
862+
request.head(options, function (error, response, body) {
863+
assert.equal(error, null)
864+
assert.equal(response.statusCode, 403)
865+
done()
866+
})
867+
})
868+
})
858869
})
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
2+
3+
<#DotAcl> a acl:Authorization ;
4+
acl:accessTo <./.acl> ;
5+
acl:agent <https://tim.localhost:7777/profile/card#me> ;
6+
acl:mode acl:Read .

0 commit comments

Comments
 (0)