<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>23033</bug_id>
          
          <creation_ts>2013-08-21 12:02:50 +0000</creation_ts>
          <short_desc>Requesting PermissionDeniedError to be added</short_desc>
          <delta_ts>2016-05-11 16:27:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>WebIDL</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>23035</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Harald Alvestrand">harald</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>annevk</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>cam</cc>
    
    <cc>jyasskin</cc>
    
    <cc>mike</cc>
    
    <cc>mounir</cc>
    
    <cc>mvanouwerkerk</cc>
    
    <cc>nsm.nikhil</cc>
    
    <cc>philipj</cc>
    
    <cc>public-script-coord</cc>
    
    <cc>w3c</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      <flag name="needinfo"
          id="114"
          type_id="3"
          status="?"
          setter="philipj"
          requestee="cam"
    />

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92414</commentid>
    <comment_count>0</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2013-08-21 12:02:50 +0000</bug_when>
    <thetext>In the DOMError error code list, the WebRTC working group would like to have added.

Name: PermissionDeniedError
Description: User or security policy denied the request

The main use case is to return this error when an user does not grant permission to access his camera.

No error code is needed.

Specification link: http://dev.w3.org/2011/webrtc/editor/getusermedia.html#attributes-4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95510</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-10-29 11:39:19 +0000</bug_when>
    <thetext>IDL needs to take care of the exception story for the web. Reassigning relevant bugs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104329</commentid>
    <comment_count>2</comment_count>
    <who name="Nikhil">nsm.nikhil</who>
    <bug_when>2014-04-24 10:53:10 +0000</bug_when>
    <thetext>Bumping this since this issue was raised in the context of the Push API.

When a user explicitly denies push permission when an application calls register(), we&apos;d like to reject with PermissionDeniedError.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104337</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-04-24 13:13:43 +0000</bug_when>
    <thetext>Nikhil, just go for it. The name for the DOMException can be added to IDL later. Make sure you indicate it&apos;s a DOMException.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104339</commentid>
    <comment_count>4</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2014-04-24 13:29:16 +0000</bug_when>
    <thetext>Is there a theory for when &quot;later&quot; is in the sentence &quot;can be added to IDL later&quot;?

This has been hanging around for 8 months now, and I&apos;ve seen no action from the assignee on it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104342</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-04-24 13:41:42 +0000</bug_when>
    <thetext>IDL is not a project with proper staffing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104355</commentid>
    <comment_count>6</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2014-04-24 15:00:26 +0000</bug_when>
    <thetext>(In reply to Harald Alvestrand from comment #0)
&gt; In the DOMError error code list, the WebRTC working group would like to have
&gt; added.

You should not use DOMError for anything. See red note:
http://dom.spec.whatwg.org/#interface-domerror

 
&gt; Name: PermissionDeniedError
&gt; Description: User or security policy denied the request
&gt; 
&gt; The main use case is to return this error when an user does not grant
&gt; permission to access his camera.
&gt; 
&gt; No error code is needed.
&gt; 
&gt; Specification link:
&gt; http://dev.w3.org/2011/webrtc/editor/getusermedia.html#attributes-4

This is bug for the DOM spec, no? Not part of WebIDL?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104358</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-04-24 15:19:11 +0000</bug_when>
    <thetext>No it is for IDL, see red note: http://dom.spec.whatwg.org/#errors ^_^</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104360</commentid>
    <comment_count>8</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2014-04-24 15:25:04 +0000</bug_when>
    <thetext>(In reply to Anne from comment #7)
&gt; No it is for IDL, see red note: http://dom.spec.whatwg.org/#errors ^_^

heh, red note hot potato :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112897</commentid>
    <comment_count>9</comment_count>
    <who name="Michael van Ouwerkerk">mvanouwerkerk</who>
    <bug_when>2014-10-09 15:09:18 +0000</bug_when>
    <thetext>I&apos;d like to get this specced somwhere. I&apos;m not in favor of monkey patching this in the Push API. If IDL is not staffed, it seems better to add it to DOM than to define it in Push.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112898</commentid>
    <comment_count>10</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-10-09 15:15:40 +0000</bug_when>
    <thetext>Michael, it&apos;s not entirely clear to me the user refusing permission is an error (see recent discussion on WHATWG list), but ignoring that the best way forward is to simply use DOMException and mint a new name if the names from http://heycam.github.io/webidl/#idl-DOMException-error-names are not satisfactory. I&apos;m sure it will be added at some point.

It will no longer be added to DOM, as IDL recently took over the definition of DOMException. Too low-level for DOM now to touch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112908</commentid>
    <comment_count>11</comment_count>
    <who name="Michael van Ouwerkerk">mvanouwerkerk</who>
    <bug_when>2014-10-09 15:36:02 +0000</bug_when>
    <thetext>Hi Anne, I did see the whatwg discussion on permission requests and promises. The Push API does not have a method for explicitly requesting permissions. Check the spec for details, I think promise rejection when permission is denied is appropriate for the current API design. Fulfilling the promise for the register method successfully requires a PushRegistration which would not exist if permission was rejected.

How can we proceed on getting PermissionDeniedError in WebIDL then? Should I ping Cameron or are there other editors for WebIDL that can do this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112909</commentid>
    <comment_count>12</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-10-09 15:40:33 +0000</bug_when>
    <thetext>Just leave this bug open and start using the new name. It&apos;s just a registry after all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125198</commentid>
    <comment_count>13</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2016-02-22 08:40:56 +0000</bug_when>
    <thetext>Ping!

It looks to me like PermissionDeniedError is the union of SecurityError and NotAllowedError [1] so how should spec editors pick going forward?

[1] https://github.com/heycam/webidl/pull/85</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126415</commentid>
    <comment_count>14</comment_count>
    <who name="Jeffrey Yasskin">jyasskin</who>
    <bug_when>2016-05-11 16:27:48 +0000</bug_when>
    <thetext>Closing this to match https://github.com/heycam/webidl/issues/95.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>