187d2334创建于 2025年6月12日历史提交
文件最后提交记录最后更新时间
将AbilityAccessCtrl转为Stage模型 Signed-off-by: @two-thousand-or-three-thousand <lisiquan1@huawei.com> 3 年前
修改模块级配置文件解决编译失败问题 Signed-off-by: zwx1126739 <zhanghong121@huawei.com> 2 年前
Upload、AbilityAccessCtrl、MissionManager、StaticSubscriber、Bluetooth ohpm迁移 Signed-off-by: zwx1126739 <zhanghong121@huawei.com> 3 年前
AbilityAccessCtrl json补充 Signed-off-by: wanghanghui <wanghanghui2@huawei.com> 2 年前
将AbilityAccessCtrl转为Stage模型 Signed-off-by: @two-thousand-or-three-thousand <lisiquan1@huawei.com> 3 年前
0230 流水线编译问题处理 Signed-off-by: sunwenxu <sunwenxu1@huawei.com> 3 年前
修改失效链接 Signed-off-by: yuandongping <yuandongping@huawei.com> 1 年前
链接替换 Signed-off-by: yuandongping <yuandongping@huawei.com> 11 个月前
revert sdk version 10->9 Signed-off-by: sunwenxu <sunwenxu1@huawei.com> 3 年前
将AbilityAccessCtrl转为Stage模型 Signed-off-by: @two-thousand-or-three-thousand <lisiquan1@huawei.com> 3 年前
Upload、AbilityAccessCtrl、MissionManager、StaticSubscriber、Bluetooth ohpm迁移 Signed-off-by: zwx1126739 <zhanghong121@huawei.com> 3 年前
Upload、AbilityAccessCtrl、MissionManager、StaticSubscriber、Bluetooth ohpm迁移 Signed-off-by: zwx1126739 <zhanghong121@huawei.com> 3 年前
Upload、AbilityAccessCtrl、MissionManager、StaticSubscriber、Bluetooth ohpm迁移 Signed-off-by: zwx1126739 <zhanghong121@huawei.com> 3 年前
添加自动化测试用例 Signed-off-by: @two-thousand-or-three-thousand <lisiquan1@huawei.com> 3 年前
README.md

Access Permission Control

Introduction

This sample shows how @ohos.abilityAccessCtrl works to implement app permission control. The display effect is as follows:

Concepts

Application access control: provides application permission management, including authentication, authorization, and authorization revocation.

Required Permissions

  • ohos.permission.GET_SENSITIVE_PERMISSIONS

  • ohos.permission.REVOKE_SENSITIVE_PERMISSIONS

  • ohos.permission.GRANT_SENSITIVE_PERMISSIONS

  • ohos.permission.GET_BUNDLE_INFO_PRIVILEGED

  • ohos.permission.GET_BUNDLE_INFO

  • ohos.permission.MICROPHONE

Usage

  1. Open the app. A dialog box is displayed, asking you whether to grant the permission. Touch Cancel.

  2. The permission check screen is displayed. Touch the Check Permission button. A message is displayed, indicating that the permission is not granted.

  3. Close the app and open it again. A dialog box is displayed, asking you whether to grant the permission. Touch OK.

  4. The permission check screen is displayed. Touch the Check Permission button. A message is displayed, indicating that the permission has been granted.

  5. Close the app and open it again. No dialog box is displayed. Touch the Check Permission button. A message is displayed, indicating that the permission has been granted.

Constraints

  • This sample can only be run on standard-system devices.

  • Before building a project, you need to run Make Module 'entry'.

  • This sample requires DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100) to compile and run.

  • The ohos.permission.GET_SENSITIVE_PERMISSIONS, ohos.permission.REVOKE_SENSITIVE_PERMISSIONS, and ohos.permission.GRANT_SENSITIVE_PERMISSIONS permissions used in this sample are of the system_core level. You need to configure signatures for these permissions. For details about the application permission level (APL), see Permission List.