-
Notifications
You must be signed in to change notification settings - Fork 51
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
Permission API has terminology issues one could drive a truck through. #85
Comments
This API has context for calls to functions like I believe the original intent of this spec was to deal with both temporary and persistent permissions. It doesn't do a great job of that yet, because of the description of a single permission store, but I think that's fixable. I do think we might want to rename this spec to just "Permissions": it defines the platform permission architecture in addition to an API, and other specs, like Media Capture, are likely to reference this one primarily to interact with that architecture, not because they want to use the API. It's a little like https://storage.spec.whatwg.org/ in that regard. I'll leave this open for a day or two to let other people chime in, but I don't expect to take these suggestions. |
Please see beyond my recommendation to the issues I point out. This is after all an issue not a PR, and I believe it points out real terminology issues with the spec:
We should leave it open until these are addressed. Again, my main explanation about the poor terminology is laid out in w3c/mediacapture-main#334 (comment), not here, so please go read that first. Let me walk through, for instance, the request algorithm to illustrate how little sense it makes:
I assume permission storage type must mean PermissionStorage since there are no other sub-classes anywhere in the spec. That in turn is "just an explanatory device", and really just a
a
This is just another
This is hand-waving.
The term increase permissions is not defined or explained anywhere. My best guess is that "to increase permissions" means change the
And we can stop here, as this seems to be all this algorithm really does: ask the user if it can change Now @jyasskin please explain to me what a "temporary permission" is in this spec.
If we keep going, another red flag here is that this seems to describe an API that sometimes returns a promise and sometimes not. A terrible API for error handling. But it suggests something more ominous, which is that this appears to be an attempt to describe a pattern rather than any specific API. I've seen this before and the results are always disastrous: a spec that doesn't do anything, a bunch of air, and worse, a spec that tries to enforce generalities and shape things without doing any lifting, and without accomplishing anything other than the behavioral symmetry it seems to proclaim is a worthy goal in itself. Specs should be specific, and not dabble in generalities. Coaxing things that are inherently different into lockstep for no apparent reason other than ergonomics is close to cargo-cult science in my book.
This says TODO. |
Way better title, thanks. I'll reply to w3c/mediacapture-main#334 (comment) in this thread to keep the permissions discussion over here.
This spec tries to use "permission" to mean the ability to access the capability, whether that's the camera, mic, location, notifications, etc. "persistent permission" is such an ability that will survive a page reload. "temporary permission" is such an ability that won't survive a reload, but you've pointed out that there are possibly two levels of temporary-ness: one where a new call to, e.g. As I've said, the spec does a bad job of accommodating temporary permissions, but we're working on fixing that. It's always tried to accommodate them, with, for example "User agents may use a form of storage to keep track of web site permissions.", but it's always needed more to carry that through.
What you're seeing here is that the algorithms aren't finished. (That's what "TODO" means.) The most finished one is the |
@jyasskin I'm sure you mean well, but you seem to hold a certain view of what the spec "is" or "tries to do", that I find no support for in what's actually written down. To me that means there's no consensus behind your claims. I'm used to a process where such claims must be in the form of a proposal for people to vote on. |
@jyasskin sorry got a little heated there. I admire your conviction, it's just that I happen to disagree with the direction you have in mind. |
That's why this is still an Editor's Draft, and not a Working Draft. When it's finished enough to Call for Consensus, we'll do that. Until then, I don't claim that the current text represents any sort of consensus. I do think the direction we're going will get us to a place that has consensus, but if you don't think so, we can keep having that discussion. You're also totally welcome to fork the spec and try to produce something that reflects the community's opinions better. |
I think #97 fixed most of this. It changed things from talking about "having a permission" to "having permission to access/use a feature". If you find any particular places I missed, please reopen this issue or a new more focused one. |
Rather than rehash it here, I ask that people read what I just posted in w3c/mediacapture-main#334 (comment), as context is important.
Ask:
request
Drop .request() #83 orrevoke
Consider removing Permissions.revoke(). #46 of _access_.The text was updated successfully, but these errors were encountered: