...
Panel |
---|
|
@prefix webac: <http://fedora.info/definitions/v4/webac#>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
<> a webac:Acl .
|
Panel |
---|
|
@prefix ldp: <http://www.w3.org/ns/ldp#>.
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
@prefix dc: <http://purl.org/dc/elements/1.1/>.
<> acl:accessControl </fcrepo/rest/acl>;
dc:title "Hello, World!".
|
Panel |
---|
|
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
<> a acl:Authorization;
acl:accessTo <http://localhost:8080</fcrepo/rest/foo>;
acl:agent "user1";
acl:mode acl:Read.
|
...
Now this should return a 204 No Content response. To verify that the update happened, you can also go to http://localhost:8080/fcrepo/rest/foo in your web browser, and confirm that it has both dc:title and dc:description properties.
Info |
---|
title | Access Control Link Header |
---|
|
When you perform a successful GET request on a resource that has an ACL associated with it (or with an ancestor), you will receive an additional header of the format. Code Block |
---|
Link: <http://localhost:8080/fcrepo/rest/acl>; rel="acl" |
This can be used when indexing repository content to determine what the access controls on the resource are. |
Note |
---|
title | ACLs for the Repository Root |
---|
|
When creating an ACL to protect the repository root, you must include a trailing slash in the Authorizations's acl:accessTo predicate, otherwise the Authorization will not match the request URI, and won't get applied.
Code Block |
---|
language | text |
---|
title | Non-Working Version |
---|
| <> a acl:Authorization;
acl:accessTo <https://localhost:8080/fcrepo/rest> . |
Code Block |
---|
language | text |
---|
title | Working Version |
---|
| <> a acl:Authorization;
acl:accessTo <https://localhost:8080/fcrepo/rest/> .
# note this trailing slash ---------------------^ |
|