-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Search terms you've used
getResourceInfoWithAccessDatasets
Bug description
The getResourceInfoWithAccessDatasets method in acp.ts does not return the access datasets as expected.
More specifically, when the resource is ACP-controlled and the policy URL is set in internal_resourceInfo.aclUrl (as is the case with f.i. the Inrupt PodSpaces)
In that case, the internal_fetchAcl method internally receives a AclIsAcrError, and results in null ACLs
solid-client-js/src/acl/acl.internal.ts
Lines 93 to 96 in 9cbd59a
| if (e instanceof AclIsAcrError) { | |
| return { | |
| resourceAcl: null, | |
| fallbackAcl: null, |
However,
getResourceInfoWithAccessDatasets ignores the empty ACLs or the AclIsAcrError and returns thinking it is indeed an ACL (L206), and never reaches the fetchAcr call as it should in that case.solid-client-js/src/acp/acp.ts
Lines 204 to 209 in 9cbd59a
| if (hasAccessibleAcl(resourceInfo)) { | |
| const acl = await internal_fetchAcl(resourceInfo, options); | |
| return internal_setAcl(resourceInfo, acl); | |
| } | |
| const acr = await fetchAcr(resourceInfo, options); | |
| return { ...resourceInfo, ...acr }; |
Expected result
Get the ACR datasets as expected when the ACP policy URL is set in internal_resourceInfo.aclUrl
Actual result
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working