linkeddata / rdflib.js

Linked Data API for JavaScript
http://linkeddata.github.io/rdflib.js/doc/
Other
566 stars 143 forks source link

Add WAC-Allow header awareness in updater's editable() function #332

Open timbl opened 5 years ago

timbl commented 5 years ago

The solid spec requires servers to send headers like

WAC-Allow: user="read",public="read"

which give the user an insight into the operations which are allowed to them, and to the public, by the Access Control system. Where this header is present, the RDFLIB client should not assume it can modify the document if it is not allowed to.

This will cause UIs to be simpler by removing modification tools, and prevent users from being offered editing when they are not allowed.

So, if the resource is currently editable (there is a defined editing protocol), and when the AC-header is present, and when it does not include "write" in the user permissions, then the editable function should return something false-like

timbl commented 5 years ago

Used by various features already, but also should be in future in all forms https://github.com/solid/solid-ui/issues/88