From 6be9faa5e60d8fb3a3f98f75740c7c468c38fac2 Mon Sep 17 00:00:00 2001 From: king_he <6384784@qq.com> Date: Fri, 20 May 2022 03:24:31 +0000 Subject: [PATCH] update en/application-dev/reference/apis/js-apis-abilityAccessCtrl.md. Signed-off-by: king_he <6384784@qq.com> --- .../apis/js-apis-abilityAccessCtrl.md | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-abilityAccessCtrl.md b/en/application-dev/reference/apis/js-apis-abilityAccessCtrl.md index 874341bd76..01069d8a12 100644 --- a/en/application-dev/reference/apis/js-apis-abilityAccessCtrl.md +++ b/en/application-dev/reference/apis/js-apis-abilityAccessCtrl.md @@ -1,6 +1,6 @@ -# Ability Access Control +# Ability Access Control -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
+> **NOTE**
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import @@ -20,9 +20,9 @@ Creates an **AtManager** instance, which is used for ability access control. **Return value** -| Type| Description| -| -------- | -------- | -| [AtManager](#atmanager) | **AtManager** instance obtained.| + | Type | Description | + | -------- | -------- | + | [AtManager](#atmanager) | **AtManager** instance obtained. | **Example** @@ -44,16 +44,16 @@ Checks whether an application has been granted the specified permission. This AP **Parameters** -| Name | Type | Mandatory| Description | -| -------- | ------------------- | ---- | ------------------------------------------ | -| tokenID | number | Yes | ID of the application. | -| permissionName | string | Yes | Name of the permission to verify.| + | Name | Type | Mandatory | Description | + | -------- | ------------------- | ---- | ------------------------------------------ | + | tokenID | number | Yes | ID of the application. | + | permissionName | string | Yes | Name of the permission to verify. | **Return value** -| Type | Description | -| :------------ | :---------------------------------- | -| Promise<GrantStatus> | Promise instance used to return the result.| + | Type | Description | + | :------------ | :---------------------------------- | + | Promise<GrantStatus> | Promise instance used to return the result. | **Example** @@ -78,17 +78,17 @@ Grants a user granted permission to an application. This API uses a promise to r **Parameters** -| Name | Type | Mandatory| Description | -| --------- | ------------------- | ---- | ------------------------------------------------------------ | -| tokenID | number | Yes | ID of the application. | -| permissionName | string | Yes | Name of the permission to grant.| -| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | + | Name | Type | Mandatory | Description | + | --------- | ------------------- | ---- | ------------------------------------------------------------ | + | tokenID | number | Yes | ID of the application. | + | permissionName | string | Yes | Name of the permission to grant. | + | permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | **Return value** -| Type | Description | -| :------------ | :---------------------------------- | -| Promise<number> | Promise instance used to return the result.| + | Type | Description | + | :------------ | :---------------------------------- | + | Promise<number> | Promise instance used to return the result. | **Example** @@ -115,12 +115,12 @@ Grants a user granted permission to an application. This API uses an asynchronou **Parameters** -| Name | Type | Mandatory| Description | -| --------- | ------------------- | ---- | ------------------------------------------------------------ | -| tokenID | number | Yes | ID of the application. | -| permissionName | string | Yes | Name of the permission to grant.| -| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | -| callback | AsyncCallback<number> | Yes| Callback used to return the result.| + | Name | Type | Mandatory | Description | + | --------- | ------------------- | ---- | ------------------------------------------------------------ | + | tokenID | number | Yes | ID of the application. | + | permissionName | string | Yes | Name of the permission to grant. | + | permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | + | callback | AsyncCallback<number> | Yes | Callback used to return the result. | **Example** @@ -145,17 +145,17 @@ Revokes a user granted permission given to an application. This API uses a promi **Parameters** -| Name | Type | Mandatory| Description | -| --------- | ------------------- | ---- | ------------------------------------------------------------ | -| tokenID | number | Yes | ID of the application. | -| permissionName | string | Yes | Name of the permission to revoke.| -| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | + | Name | Type | Mandatory | Description | + | --------- | ------------------- | ---- | ------------------------------------------------------------ | + | tokenID | number | Yes | ID of the application. | + | permissionName | string | Yes | Name of the permission to revoke. | + | permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | **Return value** -| Type | Description | -| :------------ | :---------------------------------- | -| Promise<number> | Promise instance used to return the result.| + | Type | Description | + | :------------ | :---------------------------------- | + | Promise<number> | Promise instance used to return the result. | **Example** @@ -181,12 +181,12 @@ Revokes a user granted permission given to an application. This API uses an asyn **Parameters** -| Name | Type | Mandatory| Description | -| --------- | ------------------- | ---- | ------------------------------------------------------------ | -| tokenID | number | Yes | ID of the application. | -| permissionName | string | Yes | Name of the permission to revoke.| -| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | -| callback | AsyncCallback<number> | Yes| Callback used to return the result.| + | Name | Type | Mandatory | Description | + | --------- | ------------------- | ---- | ------------------------------------------------------------ | + | tokenID | number | Yes | ID of the application. | + | permissionName | string | Yes | Name of the permission to revoke. | + | permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | + | callback | AsyncCallback<number> | Yes | Callback used to return the result. | **Example** @@ -210,16 +210,16 @@ Obtains the flags of the specified permission of a given application. This API u **Parameters** -| Name | Type | Mandatory| Description | -| --------- | ------------------- | ---- | ------------------------------------------------------------ | -| tokenID | number | Yes | ID of the application. | -| permissionName | string | Yes | Name of the permission to query.| + | Name | Type | Mandatory | Description | + | --------- | ------------------- | ---- | ------------------------------------------------------------ | + | tokenID | number | Yes | ID of the application. | + | permissionName | string | Yes | Name of the permission to query. | **Return value** -| Type | Description | -| :------------ | :---------------------------------- | -| Promise<number> | Promise instance used to return the result.| + | Type | Description | + | :------------ | :---------------------------------- | + | Promise<number> | Promise instance used to return the result. | **Example** @@ -238,7 +238,7 @@ Enumerates the permission grant states. **System capability**: SystemCapability.Security.AccessToken -| Name | Default Value | Description | -| ----------------------------- | ---------------------- | ----------------------- | -| PERMISSION_DENIED | -1 | Permission denied. | -| PERMISSION_GRANTED | 0 | Permission granted. | + | Name | Default Value | Description | + | ----------------------------- | ---------------------- | ----------------------- | + | PERMISSION_DENIED | -1 | Permission denied. | + | PERMISSION_GRANTED | 0 | Permission granted. | -- GitLab