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

Support write-only handles #119

Open
foolip opened this issue Nov 20, 2019 · 1 comment
Open

Support write-only handles #119

foolip opened this issue Nov 20, 2019 · 1 comment
Milestone

Comments

@foolip
Copy link
Member

foolip commented Nov 20, 2019

The inline issue in https://wicg.github.io/native-file-system/#api-filesystemhandle-querypermission states:

the currently described API here assumes a model where it is not possible to have a write-only handle. I.e. it is not possible to have or request write access without also having read access. There definitely are use cases for write-only handles (i.e. directory downloads), so we might have to reconsider this.

#29 is about one use case for this, but I couldn't find an issue that would cover write-only directory downloads, so here it is.

@jromy5
Copy link

jromy5 commented May 3, 2020

The changing of the API file code

mkruisselbrink added a commit that referenced this issue Jul 14, 2020
This is partially editorial (just changing how algorithms check
permissions), but also has a couple of normative changes:

- A change from `boolean writable` to a enum, with currently "read"
  and "readwrite" options. This is to keep open the possibility for
  write-only handles as discussed in #119.
- Changes from NotAllowedError to SecurityError in a couple of places,
  to better align with how other APIs behave.
- And of course the integration with navigator.permissions.query,
  although that is unlikely to be implemented in chrome any time soon,
  as a lot of the infra for that is missing in chrome.

This fixes #120.
@mkruisselbrink mkruisselbrink added this to the V2 milestone Jul 16, 2020
mkruisselbrink added a commit that referenced this issue Jul 20, 2020
…200)

* Rewrite the permissions logic to integrate with the permissions API.

This is partially editorial (just changing how algorithms check
permissions), but also has a couple of normative changes:

- A change from `boolean writable` to a enum, with currently "read"
  and "readwrite" options. This is to keep open the possibility for
  write-only handles as discussed in #119.
- Changes from NotAllowedError to SecurityError in a couple of places,
  to better align with how other APIs behave.
- And of course the integration with navigator.permissions.query,
  although that is unlikely to be implemented in chrome any time soon,
  as a lot of the infra for that is missing in chrome.

This fixes #120.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants