• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# PermissionDef (System API)
2<!--Kit: Ability Kit-->
3<!--Subsystem: BundleManager-->
4<!--Owner: @wanghang904-->
5<!--Designer: @hanfeng6-->
6<!--Tester: @kongjing2-->
7<!--Adviser: @Brilliantry_Rui-->
8
9The module provides permission details defined in the [module.json5](../../quick-start/module-configuration-file.md) file. The information can be obtained using [bundleManager.getPermissionDef](js-apis-bundleManager-sys.md#bundlemanagergetpermissiondef).
10
11> **NOTE**
12>
13> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
14>
15> The APIs provided by this module are system APIs.
16
17## Modules to Import
18
19```ts
20import { bundleManager } from '@kit.AbilityKit';
21```
22
23## PermissionDef
24
25**System capability**: SystemCapability.BundleManager.BundleFramework.Core
26
27**System API**: This is a system API.
28
29| Name          | Type  | Read-Only| Optional| Description          |
30| -------------- | ------ | ---- | ---- | -------------- |
31| permissionName | string | Yes  | No  | Name of the permission.  |
32| grantMode      | number | Yes  | No  | [Grant mode of the permission](../../security/AccessToken/app-permission-mgmt-overview.md#authorization-mode). The value **0** means user authorization, and **1** means system authorization.|
33| labelId        | number | Yes  | No  | ID of the permission label.  |
34| descriptionId  | number | Yes  | No  | ID of the permission description.  |
35