@@ -775,137 +775,6 @@ describe('ACL with WebID+TLS', function () {
775775 } )
776776 } )
777777
778- describe . skip ( 'Group' , function ( ) {
779- var groupTriples = '<#> a <http://xmlns.com/foaf/0.1/Group>;\n' +
780- ' <http://xmlns.com/foaf/0.1/member> <a>, <b>, <' + user2 + '> .\n'
781- var body = '<#Owner>\n' +
782- ' <http://www.w3.org/ns/auth/acl#accessTo> <' + address + abcFile + '>, <' +
783- address + abcAclFile + '>;\n' +
784- ' <http://www.w3.org/ns/auth/acl#agent> <' + user1 + '>;\n' +
785- ' <http://www.w3.org/ns/auth/acl#defaultForNew> <' + address + testDir + '>;\n' +
786- ' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write> .\n' +
787- '<#Group>\n' +
788- ' <http://www.w3.org/ns/auth/acl#accessTo> <' + address + abcFile + '>;\n' +
789- ' <http://www.w3.org/ns/auth/acl#agentClass> <' + address + groupFile + '#>;\n' +
790- ' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read> .\n'
791- it ( 'user1 should be able to add group triples' , function ( done ) {
792- var options = createOptions ( groupFile , 'user1' )
793- options . headers = {
794- 'content-type' : 'text/turtle'
795- }
796- options . body = groupTriples
797- request . put ( options , function ( error , response , body ) {
798- assert . equal ( error , null )
799- assert . equal ( response . statusCode , 201 )
800- done ( )
801- } )
802- } )
803- it ( "user1 should be able to modify test file's ACL file" , function ( done ) {
804- var options = createOptions ( abcAclFile , 'user1' )
805- options . headers = {
806- 'content-type' : 'text/turtle'
807- }
808- options . body = body
809- request . put ( options , function ( error , response , body ) {
810- assert . equal ( error , null )
811- assert . equal ( response . statusCode , 201 )
812- done ( )
813- } )
814- } )
815-
816- it ( "user1 should be able to access test file's ACL file" , function ( done ) {
817- var options = createOptions ( abcAclFile , 'user1' )
818- request . head ( options , function ( error , response , body ) {
819- assert . equal ( error , null )
820- assert . equal ( response . statusCode , 200 )
821- done ( )
822- } )
823- } )
824- it ( 'user1 should be able to modify test file' , function ( done ) {
825- var options = createOptions ( abcFile , 'user1' )
826- options . headers = {
827- 'content-type' : 'text/turtle'
828- }
829- options . body = '<a> <b> <c> .\n'
830- request . put ( options , function ( error , response , body ) {
831- assert . equal ( error , null )
832- assert . equal ( response . statusCode , 201 )
833- done ( )
834- } )
835- } )
836- it ( 'user1 should be able to access test file' , function ( done ) {
837- var options = createOptions ( abcFile , 'user1' )
838- request . head ( options , function ( error , response , body ) {
839- assert . equal ( error , null )
840- assert . equal ( response . statusCode , 200 )
841- done ( )
842- } )
843- } )
844- it ( "user2 should not be able to access test file's ACL file" , function ( done ) {
845- var options = createOptions ( abcAclFile , 'user2' )
846- request . head ( options , function ( error , response , body ) {
847- assert . equal ( error , null )
848- assert . equal ( response . statusCode , 403 )
849- done ( )
850- } )
851- } )
852- it ( 'user2 should be able to access test file' , function ( done ) {
853- var options = createOptions ( abcFile , 'user2' )
854- request . head ( options , function ( error , response , body ) {
855- assert . equal ( error , null )
856- assert . equal ( response . statusCode , 200 )
857- done ( )
858- } )
859- } )
860- it ( 'user2 should not be able to modify test file' , function ( done ) {
861- var options = createOptions ( abcFile , 'user2' )
862- options . headers = {
863- 'content-type' : 'text/turtle'
864- }
865- options . body = '<d> <e> <f> .\n'
866- request . put ( options , function ( error , response , body ) {
867- assert . equal ( error , null )
868- assert . equal ( response . statusCode , 403 )
869- done ( )
870- } )
871- } )
872- it ( 'agent should not be able to access test file' , function ( done ) {
873- var options = createOptions ( abcFile )
874- request . head ( options , function ( error , response , body ) {
875- assert . equal ( error , null )
876- assert . equal ( response . statusCode , 401 )
877- done ( )
878- } )
879- } )
880- it ( 'agent should not be able to modify test file' , function ( done ) {
881- var options = createOptions ( abcFile )
882- options . headers = {
883- 'content-type' : 'text/turtle'
884- }
885- options . body = '<d> <e> <f> .\n'
886- request . put ( options , function ( error , response , body ) {
887- assert . equal ( error , null )
888- assert . equal ( response . statusCode , 401 )
889- done ( )
890- } )
891- } )
892- it ( 'user1 should be able to delete group file' , function ( done ) {
893- var options = createOptions ( groupFile , 'user1' )
894- request . del ( options , function ( error , response , body ) {
895- assert . equal ( error , null )
896- assert . equal ( response . statusCode , 200 )
897- done ( )
898- } )
899- } )
900- it ( "user1 should be able to delete test file's ACL file" , function ( done ) {
901- var options = createOptions ( abcAclFile , 'user1' )
902- request . del ( options , function ( error , response , body ) {
903- assert . equal ( error , null )
904- assert . equal ( response . statusCode , 200 )
905- done ( )
906- } )
907- } )
908- } )
909778
910779 describe ( 'defaultForNew' , function ( ) {
911780 before ( function ( ) {
0 commit comments