How can user check for write permissions? (Without control permissions)

Hi,
I am trying to create an app, where part of the functionality is access management to specific documents via ACL files.

I am now at a stage, where a user with Control permissions is able to read an ACL file and parse the permissions to find out, who has what level of access.

Now I would like to implement an editing functionality, that is only enabled for users, that have the Write access. The problem is, that a user with only read + write access is not allowed to read the ACL file, therefore they are not able to check if they have write access.

Of course I could try to write to the file to find out, if the user has the permissions to do so, but I would really like to use a more elegant solution.

Any ideas, how could I achieve this functionality?

I am using @inrupt/solid-react-components to read the ACL files, so using something from this package would be preferred, but any other methods are welcome as well.

No one except those with Control access can read or write to an .acl file. So it is pointless for someone with only read+write to check if they have write access, because if they don’t have Control access, they can’t write anyway.

Also, the wac-allow header should show exactly what rights an agent has.

1 Like

Sorry, the initial description is maybe a little chaotic, English is not my first language.

The user with is viewing a file example.ttl, and I need to find out, whether they have write access to this particular file.

Thanks for the advice with the WAC-allow header, this seems like the elegant solution I was looking for.

1 Like