codeforpdx / PASS

PASS project - with HMIS module integration
MIT License
24 stars 24 forks source link

No Issue - Fix sharing of one document #601

Closed timbot1789 closed 3 months ago

timbot1789 commented 3 months ago

The sharing of an individual document seems to have broken some time back in November. This PR fixes one document permission sharing.

Testing:

  1. Upload a document to your pod (e.g. some_document.pdf)
  2. share that document with another pod
  3. Check that an ACL file has been properly generated for this file (some_document.pdf.acl)
timbot1789 commented 3 months ago

Can confirm that the file-specific .acl file is being generated from the changes. 👍

Thanks for looking at this so fast!

I assume universalAccess.setAgentAccess would neatly replace the custom setDocAclForUser made in PASS (at least in the case up create/updating file-specific .acl files)?

I believe so. It works for individual documents, but not quite for containers. This method doesn't currently have the ability to set default/inherited permissions. See this thread on the solid community forum: https://forum.solidproject.org/t/inherited-default-access-using-the-universal-api/7353/7. Whereever we are setting file-specific ACLs, we can use setAgentAccess instead.

If the limitation in setAgentAccess is removed in the future, then we could fully replace most of our custom ACL controls with it.