Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching the fallback ACL should not throw an error when the Container is not Readable #519

Open
Vinnl opened this issue Oct 16, 2020 · 0 comments
Labels
bug Something isn't working Triaged This means that we've a ticket to look at this in the future

Comments

@Vinnl
Copy link
Contributor

Vinnl commented Oct 16, 2020

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:

  1. Create a Container.
  2. Add an ACL to that Container that gives a given user Read and Control access to its children, but not to the Container itself.
  3. Create a Resource inside that Container.
  4. 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

@Vinnl Vinnl added the bug Something isn't working label Oct 16, 2020
@ThisIsMissEm ThisIsMissEm added the Triaged This means that we've a ticket to look at this in the future label May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Triaged This means that we've a ticket to look at this in the future
Projects
None yet
Development

No branches or pull requests

2 participants