@@ -499,6 +499,48 @@ describe('ACL with WebID+OIDC over HTTP', function () {
499499 } )
500500 } )
501501
502+ describe ( 'Group' , function ( ) {
503+ // before(function () {
504+ // rm('/accounts-acl/tim.localhost/group/test-folder/.acl')
505+ // })
506+
507+ // it('should PUT new ACL file', function (done) {
508+ // var options = createOptions('/group/test-folder/.acl', 'user1')
509+ // options.body = '<#Owner> a <http://www.w3.org/ns/auth/acl#Authorization>;\n' +
510+ // ' <http://www.w3.org/ns/auth/acl#accessTo> <./.acl>;\n' +
511+ // ' <http://www.w3.org/ns/auth/acl#agent> <' + user1 + '>;\n' +
512+ // ' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write>, <http://www.w3.org/ns/auth/acl#Control> .\n' +
513+ // '<#Public> a <http://www.w3.org/ns/auth/acl#Authorization>;\n' +
514+ // ' <http://www.w3.org/ns/auth/acl#accessTo> <./>;\n' +
515+ // ' <http://www.w3.org/ns/auth/acl#agentGroup> <group-listing#folks>;\n' +
516+ // ' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read> .\n'
517+ // request.put(options, function (error, response, body) {
518+ // assert.equal(error, null)
519+ // assert.equal(response.statusCode, 201)
520+ // done()
521+ // })
522+ // })
523+ it ( 'user1 should be able to access test directory' , function ( done ) {
524+ var options = createOptions ( '/group/test-folder/' , 'user1' )
525+
526+ request . head ( options , function ( error , response , body ) {
527+ assert . equal ( error , null )
528+ assert . equal ( response . statusCode , 200 )
529+ done ( )
530+ } )
531+ } )
532+ it ( 'user2 should be able to access test directory' ,
533+ function ( done ) {
534+ var options = createOptions ( '/group/test-folder/' , 'user2' )
535+
536+ request . head ( options , function ( error , response , body ) {
537+ assert . equal ( error , null )
538+ assert . equal ( response . statusCode , 200 )
539+ done ( )
540+ } )
541+ } )
542+ } )
543+
502544 describe ( 'Restricted' , function ( ) {
503545 var body = '<#Owner> a <http://www.w3.org/ns/auth/acl#Authorization>;\n' +
504546 ' <http://www.w3.org/ns/auth/acl#accessTo> <./abc2.ttl>;\n' +
0 commit comments