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

Should we align permissionState values with other APIs? #80

Closed
clelland opened this issue May 25, 2015 · 8 comments · May be fixed by #81
Closed

Should we align permissionState values with other APIs? #80

clelland opened this issue May 25, 2015 · 8 comments · May be fixed by #81

Comments

@clelland
Copy link
Contributor

In #39, we've discussed the merits of sharing method names for the {get|has}Permission(Stat{e|us}?) method with the Push, Notification, and Permissions APIs.

Should we also be aligning the enum values values with those APIs? Push and Permissions both use granted, denied, and prompt, while Notifications and BackgroundSync have default, denied, and granted.

If we're eventually moving to the Permissions API, then maybe we should be using it's enums. I think that 'prompt' is useful to have, and makes more sense than default for BackgroundSync. ('default' is a nebulous concept anyway, and if the user agent reserves the right to change what the default behaviour is, then it doesn't tell the app developer anything at all. 'prompt' is at least explicit about what will happen.)

@wibblymat
Copy link
Contributor

To reverse this, is there any good reason NOT to change it? What was the rationale for making it default in the first place?

@beverloo
Copy link
Member

Please use prompt rather than default.

Notifications is the outlier here, but it's rather difficult to change the value given that multiple implementations shipped it already. Newer APIs have settled on prompt.

@KenjiBaheux
Copy link
Collaborator

+1 to converge on prompt (I don't remember seeing a rationale for default).

@domenic
Copy link

domenic commented May 26, 2015

+1 to converge to default; I wish the Permissions API didn't fork the existing shipping APIs with its new name for things.

@clelland
Copy link
Contributor Author

@domenic -- to be clear, your +1 is a dissenting opinion, right? To keep it as-is rather than align with Permissions?

@domenic
Copy link

domenic commented May 28, 2015

@clelland yeah, as well as a vote for fixing Permissions. grumble grumble.

@annevk
Copy link
Contributor

annevk commented Jun 3, 2015

I also dislike the Permissions API forking precedent.

@jkarlin
Copy link
Collaborator

jkarlin commented Oct 8, 2015

The one-shot spec has no permission status method. I suggest for one-shots that we keep it that way and if we need permission in the future we can use the Permissions API for it.

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 a pull request may close this issue.

7 participants