...
I want to allow a user with username "smith123" to have read, write access to resource http://localhost:8080/rest/webacl_box1.
Using these two "files" to create our Authorization and ACL resources.
Code Block title Acl.txtttl @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix ldp: <http://www.w3.org/ns/ldp#> . <> a ldp:BasicContainer ; rdf:type ???:WebAcl .
Code Block title Authorization.txtttl @prefix acl: <http://www.w3.org/ns/auth/acl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix ldp: <http://www.w3.org/ns/ldp#> . <> a ldp:RDFSource ; rdf:type acl:Authorization ; acl:agent "smith123" ; acl:mode acl:Read, acl:Write ; acl:accessTo <http://localhost:8080/rest/webacl_box1> .
We would execute the following commands.
Code Block > curl -X POST -H "Content-type: text/turtle" --data-binary "@Acl.txtttl" "http://localhost:8080/rest" http://localhost:8080/rest/new/node/acl > curl -X POSTPUT -H "Content-type: text/turtle" --data-binary "@Authorization.txtttl" "http://localhost:8080/rest" http://localhost:8080/rest/new/node/authorization > echo "PREFIX ldp: <http://www.w3.org/ns/ldp#> INSERT INTO { <> ldp:contains <http://localhost:8080/rest/new/node/authorization> . }" | curl -X PATCH -H "Content-type: application/sparql-update" --upload-file - "acl/auth1" http://localhost:8080/rest/new/node/acl"/auth1 > echo "PREFIX acl: <http://www.w3.org/ns/auth/acl#> INSERT INTO { <> acl:accessControl <http://localhost:8080/rest/new/node/acl> . }" | curl -X PATCH -H "Content-type: application/sparql-update" --upload-file - "http://localhost:8080/rest/webacl_box1"
- I wants this group to have write access on this collection
....