Permissions element (ContentApp complexType) (apps for Office 1.1)
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".
Introduced in
apps for Office Manifest Schema Reference v1.0
Element information
Element type |
Not defined |
Namespace |
https://schemas.microsoft.com/office/appforoffice/1.1 |
Schema file |
OfficeAppManifestv1.1.xsd |
Definition
<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>
Elements and attributes
スキーマで sequence、minOccurs、maxOccurs、choice などの具体的な要件が定義されている場合は、定義のセクションを参照してください。
Parent elements
None.
Child elements
None.
Attributes
None.
Enumeration values
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.