If a user is given acl:Write permissions on a resource, and we then call webacl.resource.hasRights, it will return that this user has no acl:Append permission.
This is not a bug since this is acknowledged in tests:
|
expect(resourceRights).toMatchObject({ |
|
read: true, |
|
write: true, |
|
append: false, |
|
control: true |
|
}); |
Note that the Fuseki WAC extension considers that a user with acl:Write permission has also full permission to append.
So my proposal would be to refactor the webacl.resource.hasRights so that, if a user has acl:Write permission, it will also return append: true. This way the webacl.resource.hasRights action reflects what is done by the Fuseki WAC extension.
What do you think @nikoPLP ? Could it have bad side effect on other parts of the code ? And as a side question:
- Should we also consider that someone with
acl:Write permission also has acl:Read permission ?
- What about
acl:Control ? Does the Fuseki extension consider this also grants all other permissions ?
If a user is given
acl:Writepermissions on a resource, and we then callwebacl.resource.hasRights, it will return that this user has noacl:Appendpermission.This is not a bug since this is acknowledged in tests:
semapps/src/middleware/tests/webacl/resourceCRUD.test.js
Lines 75 to 80 in 64e0480
Note that the Fuseki WAC extension considers that a user with
acl:Writepermission has also full permission to append.So my proposal would be to refactor the
webacl.resource.hasRightsso that, if a user hasacl:Writepermission, it will also returnappend: true. This way thewebacl.resource.hasRightsaction reflects what is done by the Fuseki WAC extension.What do you think @nikoPLP ? Could it have bad side effect on other parts of the code ? And as a side question:
acl:Writepermission also hasacl:Readpermission ?acl:Control? Does the Fuseki extension consider this also grants all other permissions ?