1. Introduction
This document specifies a function to relinquish permissions that are no longer
needed.
2. Revoke API
partial interface Permissions {
Promise<PermissionStatus> revoke(object permissionDesc);
};
When the revoke(permissionDesc) method is
invoked, the UA MUST run the following algorithm, passing the parameter permissionDesc:
-
Let rootDesc be the object permissionDesc refers to, converted to an
IDL value of type PermissionDescriptor. If this throws an exception,
return a promise rejected with that exception and abort these steps.
-
Let typedDescriptor be the object permissionDesc refers to, converted
to an IDL value of rootDesc.name’s permission descriptor type. If this throws an exception, return a
promise rejected with that exception and abort these steps.
-
Return a new promise promise and run the following steps in parallel:
-
The UA now has new
information that the user intends to revoke permission to use the
feature described by typedDescriptor.
-
If any tasks run due to Reacting to
users revoking permission, wait for them to finish.
-
Queue a task to resolve promise with the result of query(permissionDesc).
This should pass typedDescriptor directly into the
parallel part of query().
3. Security Considerations
No security considerations have been identified.
4. Privacy Considerations
No privacy considerations have been identified.
Document conventions
Conformance requirements are expressed
with a combination of descriptive assertions
and RFC 2119 terminology.
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL”
in the normative parts of this document
are to be interpreted as described in RFC 2119.
However, for readability,
these words do not appear in all uppercase letters in this specification.
All of the text of this specification is normative
except sections explicitly marked as non-normative, examples, and notes. [RFC2119]
Examples in this specification are introduced with the words “for example”
or are set apart from the normative text
with class="example",
like this:
This is an example of an informative example.
Informative notes begin with the word “Note”
and are set apart from the normative text
with class="note",
like this:
Note, this is an informative note.
Requirements phrased in the imperative as part of algorithms
(such as "strip any leading space characters"
or "return false and abort these steps")
are to be interpreted with the meaning of the key word
("must", "should", "may", etc)
used in introducing the algorithm.
Conformance requirements phrased as algorithms or specific steps
can be implemented in any manner,
so long as the end result is equivalent.
In particular, the algorithms defined in this specification
are intended to be easy to understand
and are not intended to be performant.
Implementers are encouraged to optimize.