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

refactor(cli/js/permissions): Split read/write permission descriptors #4774

Merged
merged 1 commit into from
Apr 28, 2020

Conversation

nayeemrmn
Copy link
Collaborator

I'm not 100% confident that these might not have different options later... one for each permission is simpler anyway.

@@ -1668,11 +1668,12 @@ declare namespace Deno {
Busy: ErrorConstructor;
};

/** **UNSTABLE**: potentially want names to overlap more with browser.
Copy link
Collaborator Author

@nayeemrmn nayeemrmn Apr 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't. Even if appropriately named permissions existed on the web, it's nonsense to try and align ours so we can get away with putting Deno's permissions in navigator, since they will inevitably mean different things.

The strategy would be to leave Deno.permissions as is and also have navigator.permissions to contain web-compatible permissions like "notifications" (#4257 (comment)) and "persistent-storage" (#1657).

If you really want to have one permissions namespace, an alternative strategy would be to allow this:

navigator.permissions.query({ name: Deno.symbols.read })

@bartlomieju bartlomieju requested a review from ry April 23, 2020 12:59
@nayeemrmn
Copy link
Collaborator Author

@ry Please review.

@bartlomieju bartlomieju merged commit 76ee6fb into denoland:master Apr 28, 2020
@nayeemrmn nayeemrmn deleted the read-write-permissions branch April 28, 2020 14:57
SASUKE40 pushed a commit to SASUKE40/deno that referenced this pull request May 7, 2020
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

Successfully merging this pull request may close these issues.

2 participants