inrupt / inrupt/solid-client-js

getResourceInfoWithAccessDatasets fails to return ACP data

Open
#2,380 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.