Permissions element (ContentApp complexType) (apps for Office)
Published: February 26, 2013
Controls the subset of the API that may be available to this content app at runtime; the developer should request permissions based on "least privilege".
|
Element type |
xs:string |
|
Namespace |
http://schemas.microsoft.com/office/appforoffice/1.0 |
|
Schema file |
offappmanifest.xsd |
<xs:element name="Permissions" minOccurs="1" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Restricted" />
<xs:enumeration value="ReadDocument" />
<xs:enumeration value="WriteDocument" />
<xs:enumeration value="ReadWriteDocument" />
</xs:restriction>
</xs:simpleType>
</xs:element>
Parent elements
None.
Child elements
None.
Attributes
None.
|
Value |
Description |
|---|---|
|
Restricted |
Permission that applies to all content apps, enables activation, and allows use of the Settings object API. |
|
ReadDocument |
Includes the Restricted permission, and also enables the content app to use the getSelectedDataAsync method to read from the document. |
|
WriteDocument |
Includes the Restricted permission, and also enables the content app to use the setSelectedDataAsync method to write to the document. |
|
ReadWriteDocument |
Includes the ReadDocument and WriteDocument permissions, and also enables the content app to use all write methods, manage bindings, and subscribe to events. |
-
An app should request the level of permission based on the APIs it uses. Requesting insufficient permission can result in the host application blocking the use of specific APIs in the app and generating errors at runtime.