inrupt / inrupt/solid-client-js
getResourceInfoWithAccessDatasets fails to return ACP data
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 245
- Forks
- 42
- Avg merge
- 12h 49m
- Merged PRs (30d)
- 22
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 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
Actual result
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/acp/acp.ts at getResourceInfoWithAccessDatasets and inspect how it handles the ACL result before reaching fetchAcr. Then read src/acl/acl.internal.ts around internal_fetchAcl and its AclIsAcrError handling. Done means ACP-controlled resources whose policy URL is in internal_resourceInfo.aclUrl return their ACR datasets instead of treating empty ACLs as a valid ACL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authorization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100