solid-client-js
solid-client-js copied to clipboard
getResourceInfoWithAccessDatasets fails to return ACP data
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 https://github.com/inrupt/solid-client-js/blob/9cbd59aaa7f2f820de003bb89f45507bd5241804/src/acl/acl.internal.ts#L93-L96
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.
https://github.com/inrupt/solid-client-js/blob/9cbd59aaa7f2f820de003bb89f45507bd5241804/src/acp/acp.ts#L204-L209
Expected result
Get the ACR datasets as expected when the ACP policy URL is set in internal_resourceInfo.aclUrl