linkeddata / rdflib.js

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

Updater's editable() function gives out of date result after login #609

Closed timbl closed 8 months ago

timbl commented 1 year ago

The UpdateManager.editable() function replies on looking at the cache of HTTP metadata in the store to see from the heads of an earlier GET or HEAD request whether the server has indicated that the client is allowed to write to the resource.

The problem is that if in the course of the flow of the app, a user is logged in, their ability to edit a resource may improve, bt the edit function doesn't know to refresh the editable() status.

One solution would be delete a bunch of metadata from the store on log in. Not ideal, as may losing useful information.

One could imagine for example having a proces-wide concept time of last login, and for the editable() function to ignore metadata before that time.

(Is there a level-braking problem between rdflib and solid,? Well, rdflib has to be aware of solid auth anyway....)

This all assumes that there is a process-wide concept of login, but in fact different resources on the web may in future be logged in to with different states and different webids even. So this sensitivity to login state would have to be domain my domain or pod by pod.

See eg meeting discussion

bourgeoa commented 1 year ago

Yes there was a bug for it #441 and a PR #512

timbl commented 1 year ago

Ok, i searched for editable() and didn't find them. Thanks for finding them.