未验证 提交 ff09c6bf 编写于 作者: O openharmony_ci 提交者: Gitee

!6547 stage模型权限申请

Merge pull request !6547 from fanchenxuan/master
......@@ -24,9 +24,9 @@
## 权限申请声明
### config.json文件声明
### FA模型 config.json文件声明
应用需要在config.json文件中对需要的权限逐个进行声明。没有在config.json中声明的权限,应用无法获得此应用授权。
FA模型中应用需要在config.json文件中对需要的权限逐个进行声明。没有在config.json中声明的权限,应用无法获得此应用授权。
**config.json标签说明:**
......@@ -40,6 +40,41 @@
**示例:**
```json
{
"module" : {
"reqPermissions":[
{
"name" : "ohos.permission.PERMISSION1",
"reason": "$string:reason",
"usedScene": {
"abilities": [
"FormAbility"
],
"when":"inuse"
}
},
{
"name" : "ohos.permission.PERMISSION2",
"reason": "$string:reason",
"usedScene": {
"abilities": [
"FormAbility"
],
"when":"always"
}
}
],
}
}
```
### stage模型 module.json5文件声明
stage模型中应用需要在module.json5文件中对需要的权限逐个进行声明。没有在module.json5中声明的权限,应用无法获得此应用授权。
**示例:**
```json
{
"module" : {
......@@ -68,6 +103,7 @@
}
}
```
## ACL方式声明
如上述示例所示,权限"ohos.permission.PERMISSION2"的权限等级为system_basic,高于应用此时应用的APL等级,用户的最佳做法是使用ACL方式。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册