inrupt / inrupt/solid-client-js
Fetching the fallback ACL should not throw an error when the Container is not Readable
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
fallback ACL, container, error, 404
Describe the bug
When trying to fetch the fallback ACL, when the current user does not have Read access to one of the parent Containers, functions that fetch the ACL will throw an error, whereas if fetching that Container's ACL fails (because the current user does not have Control access), it just sets the fallback ACL to null because it couldn't be fetched.
Instead, not being able to get the location of the fallback ACL should also result in null instead of an error, because it, too, indicates that the fallback ACL is not available.
To Reproduce
Steps to reproduce the behavior:
- Create a Container.
- Add an ACL to that Container that gives a given user Read and Control access to its children, but not to the Container itself.
- Create a Resource inside that Container.
- When logged in as that user, call
getSolidDatasetWithAcl()on that Resource.
CodeSandbox
https://codesandbox.io/s/black-butterfly-cbsh3?fontsize=14&hidenavigation=1&theme=dark
Expected behavior
The fetched Resource should not have a fallback ACL available, but it should not throw an error either.
Log output
See CodeSandbox.
Environment
Only attempted to reproduce in the CodeSandbox.
Additional context
Discovered when investigating this question: https://gitter.im/solid/app-development?at=5f894e52bbffc02b581d264c
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 with getSolidDatasetWithAcl() and reproduce the behavior using the CodeSandbox scenario, where a user can read a Resource but not its parent Container. Trace the fallback ACL lookup and verify that failing to locate it produces a null fallback ACL rather than an error.
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
- 35/100