• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ability_access_control.h
2
3<!--Kit: Ability Kit-->
4<!--Subsystem: Security-->
5<!--Owner: @xia-bubai-->
6<!--SE: @linshuqing; @hehehe-li-->
7<!--TSE: @leiyuqian-->
8
9## Overview
10
11Declares the APIs for implementing application access control.
12
13**Library**: ability_access_control.so
14
15**File to include**: <accesstoken/ability_access_control.h>
16
17**System capability**: SystemCapability.Security.AccessToken
18
19**Since**: 12
20
21**Related module**: [AbilityAccessControl](capi-abilityaccesscontrol.md)
22
23## Summary
24
25### Functions
26
27| Name| Description|
28| -- | -- |
29| [bool OH_AT_CheckSelfPermission(const char *permission)](#oh_at_checkselfpermission) | Checks whether a permission is granted to this application.|
30
31## Function Description
32
33### OH_AT_CheckSelfPermission()
34
35```
36bool OH_AT_CheckSelfPermission(const char *permission)
37```
38
39**Description**
40
41Checks whether a permission is granted to this application.
42
43**Since**: 12
44
45
46**Parameters**
47
48| Name| Description|
49| -- | -- |
50| const char *permission | Pointer to the permission to check. For details about the permission, see the application permission list.|
51
52**Returns**
53
54| Type| Description|
55| -- | -- |
56| bool | Returns **true** if the permission has been granted to the application.<br>         Returns **false** otherwise.|
57