solid-contrib / pivot

A spec-compliant Solid server, based on a remix of CSS
8 stars 1 forks source link

CSS cannot PATCH lists [ ] #31

Open bourgeoa opened 17 hours ago

bourgeoa commented 17 hours ago

@timbl @michielbdejong

In /preferences/ Manage your Trusted App I tried to add https://podpro.dev This should insert

:me acl:trustedApp
            [
                acl:mode acl:Append, acl:Control, acl:Read, acl:Write;
                acl:origin <https://podpro.dev>] 

but failed with error 422. Some details

Preview

    {name: "UnprocessableEntityHttpError",…}
    details
    : 
    {}
    errorCode
    : 
    "H422"
    message
    : 
    "An N3 Patch delete/insert formula can not contain blank nodes."
    name
    : 
    "UnprocessableEntityHttpError"
    statusCode
    : 
    422

Payload

    @prefix solid: <http://www.w3.org/ns/solid/terms#>.
    @prefix ex: <http://www.example.org/terms#>.

    _:patch

          solid:inserts {
            <https://bourgeoa2.solidcommunity.net:8443/profile/card#me> <http://www.w3.org/ns/auth/acl#trustedApp> _:bn_wrjr7 .
            _:bn_wrjr7 <http://www.w3.org/ns/auth/acl#origin> <https://podpro.dev> .
            _:bn_wrjr7 <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read> .
            _:bn_wrjr7 <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Write> .
            _:bn_wrjr7 <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Append> .
            _:bn_wrjr7 <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Control> .
          };   a solid:InsertDeletePatch .
michielbdejong commented 3 hours ago

Thanks for spotting this! I think maybe this patch is actually incorrect. The _:patch in the subject is fine, but why is there a blank node _:bn_wrjr7 in there? Can we change mashlib so that it uses a named node there?

CSS indeed checks this

And the spec indeed specifies this