W3C home > Mailing lists > Public > public-geolocation@w3.org > November 2011

Re: revoking permission after granting permission

From: Simon Pieters <simonp@opera.com>
Date: Thu, 10 Nov 2011 15:08:38 +0100
To: "Steve Block" <steveblock@google.com>
Cc: public-geolocation@w3.org
Message-ID: <op.v4qhkoriidj3kv@simon-pieterss-macbook.local>
On Thu, 10 Nov 2011 14:51:35 +0100, Steve Block <steveblock@google.com>  
wrote:

>>> That is already the case.
>> Not if the user first allows and then changes his mind and denies.
>
> The spec certainly intends to stipulate at most one callback. As I
> mentioned, the algorithm in the spec has no concept of permission
> 'state', only of requesting permission from the user, so there can be
> no 'change of mind' for a single call to getCurrentPosition() or
> watchPosition(). If you think the spec needs clarification, please
> propose some improved wording.

In Opera, the user can change his mind. (Firefox also has UI to change the  
permission to deny, although I haven't tested its behavior.)

I think the spec should be changed to allow UAs to allow users to change  
their minds, and when they change to deny, the behavior should be as  
follows:

For getCurrentPosition, if no callback has been invoked yet, invoke the  
error callback with PERMISSION_DENIED and stop the algorithm (don't invoke  
success). If success has already been invoked, do nothing.

For watchPosition, if the algorithm is running, invoke the error callback  
with PERMISSION_DENIED and stop the algorithm.

HTH
-- 
Simon Pieters
Opera Software
Received on Thursday, 10 November 2011 14:07:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 March 2012 18:13:56 GMT