Skip to content

Commit 0b439fd

Browse files
kjetilkrubensworks
authored andcommitted
Add failing tests for wrong default use
1 parent 48da605 commit 0b439fd

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

test/integration/acl-oidc-test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,14 @@ describe('ACL with WebID+OIDC over HTTP', function () {
210210
done()
211211
})
212212
})
213+
it('should fail as acl:default it used to try to authorize', function (done) {
214+
var options = createOptions('/write-acl/bad-acl-access/.acl', 'user1')
215+
request.get(options, function (error, response, body) {
216+
assert.equal(error, null)
217+
assert.equal(response.statusCode, 403)
218+
done()
219+
})
220+
})
213221
it('should create test file', function (done) {
214222
var options = createOptions('/write-acl/test-file', 'user1')
215223
options.body = '<a> <b> <c> .'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<#0>
2+
a <http://www.w3.org/ns/auth/acl#Authorization>;
3+
<http://www.w3.org/ns/auth/acl#default> <./> ;
4+
<http://www.w3.org/ns/auth/acl#agent> <https://tim.localhost:7777/profile/card#me> ;
5+
<http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Write>, <http://www.w3.org/ns/auth/acl#Control>.

0 commit comments

Comments
 (0)