solid-ui icon indicating copy to clipboard operation
solid-ui copied to clipboard

Sharing pane overwrites current owner

Open jaxoncreed opened this issue 5 years ago • 2 comments

Did this always happen? It seems pretty big.

To Replicate:

  • In the databrowser, create a new file in, say, the private folder (https://jackson.localhost:8443/private/test.txt)
  • Once you do that, the private folder has two resources (https://jackson.localhost:8443/private/test.txt and https://jackson.localhost:8443/private/.acl - the private folder's default acl, seen below)
# ACL resource for the private folder
@prefix acl: <http://www.w3.org/ns/auth/acl#>.

# The owner has all permissions
<#owner>
    a acl:Authorization;
    acl:agent <https://jackson.localhost:8443/profile/card#me>;
    acl:accessTo <./>;
    acl:defaultForNew <./>;
    acl:mode acl:Read, acl:Write, acl:Control.
  • At this point, everything's good. text.txt inherits its permissions from private's acl.
  • Go to the sharing pane and click "Set specific sharing preferences"
  • This will cause a new file (https://jackson.localhost:8443/private/test.txt.acl) to be made (see below)
@prefix : <#>.
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
@prefix c: </profile/card#>.

:owner
    a acl:Authorization;
    acl:accessTo <test.txt>;
    acl:agent c:me;
    acl:mode acl:Control, acl:Read, acl:Write.
  • Everything's still fine because it adds c:me to the acl.
  • Now, click the green plus and the single person icon to add a new user.
  • Add another webid like https://ldp.demo-ess.inrupt.com/114176645321964550648/profile/card#me
  • This updates https://jackson.localhost:8443/private/test.txt.acl to be below
@prefix : <#>.
@prefix n0: <http://www.w3.org/ns/auth/acl#>.
@prefix c: <https://ldp.demo-ess.inrupt.com/114176645321964550648/profile/card#>.

:Read a n0:Authorization; n0:accessTo <test.txt>; n0:agent c:me; n0:mode n0:Read.
  • Notice that instead of adding the new user, it fully replaced the original owner of the document.

jaxoncreed avatar Nov 24 '20 02:11 jaxoncreed

@jaxoncreed confirmed.

  • I reproduced the problem, following exactly your steps.
  • But if I reload the page before adding a new user then the test.txt.acl is modified correctly adding a new webid with read rights

It looks like that in first place the sharing-pane do not edit the just created acl document but a new void acl document.

bourgeoa avatar Nov 24 '20 10:11 bourgeoa

That is strange. The sharing pane has seen quite a lot of use. But maybe we don't use the "Make specific sharing for this" button very often it is could have rotted. Sounds like something like doing a PUT to the web but not updating the store with the same data.

timbl avatar Nov 24 '20 15:11 timbl