提交 8717cc4d 编写于 作者: I inter515

删除defPermissions和definePermissions的配置

Signed-off-by: Ninter515 <ry.renyi@huawei.com>
上级 47c6c49d
......@@ -63,13 +63,13 @@ describe('ActsBmsAccessTokenTest', function () {
.then(bundleInfo => {
expect(bundleInfo.name).assertEqual(BUNDLE_NAME3);
expect(bundleInfo.reqPermissions.length).assertEqual(3);
expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.ALPHA");
expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.BETA");
expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING");
expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING");
expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.MICROPHONE");
expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.READ_CALENDAR");
expect(bundleInfo.reqPermissionStates.length).assertEqual(3);
expect(bundleInfo.reqPermissionStates[0]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED);
expect(bundleInfo.reqPermissionStates[0]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED);
expect(bundleInfo.reqPermissionStates[1]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED);
expect(bundleInfo.reqPermissionStates[2]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED);
expect(bundleInfo.reqPermissionStates[2]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED);
done();
}).catch((err) => {
expect(err).assertFail();
......@@ -87,14 +87,14 @@ describe('ActsBmsAccessTokenTest', function () {
.then(bundleInfo => {
expect(bundleInfo.name).assertEqual(BUNDLE_NAME2);
expect(bundleInfo.reqPermissions.length).assertEqual(5);
expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.ALPHA");
expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING");
expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.LOCATION_IN_BACKGROUND");
expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING");
expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.LOCATION_IN_BACKGROUND");
expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.READ_CALENDAR");
expect(bundleInfo.reqPermissions[3]).assertEqual("ohos.permission.SYSTEM_FLOAT_WINDOW");
expect(bundleInfo.reqPermissions[4]).assertEqual("ohos.permission.USE_BLUETOOTH");
expect(bundleInfo.reqPermissionStates.length).assertEqual(5);
expect(bundleInfo.reqPermissionStates[0]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED);
expect(bundleInfo.reqPermissionStates[1]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED);
expect(bundleInfo.reqPermissionStates[0]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED);
expect(bundleInfo.reqPermissionStates[1]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED);
expect(bundleInfo.reqPermissionStates[2]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED);
expect(bundleInfo.reqPermissionStates[3]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED);
expect(bundleInfo.reqPermissionStates[4]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED);
......@@ -115,16 +115,16 @@ describe('ActsBmsAccessTokenTest', function () {
.then(bundleInfo => {
expect(bundleInfo.name).assertEqual(BUNDLE_NAME1);
expect(bundleInfo.reqPermissions.length).assertEqual(6);
expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.ALPHA");
expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.BETA");
expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING");
expect(bundleInfo.reqPermissions[3]).assertEqual("ohos.permission.LOCATION_IN_BACKGROUND");
expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING");
expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.LOCATION_IN_BACKGROUND");
expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.MICROPHONE");
expect(bundleInfo.reqPermissions[3]).assertEqual("ohos.permission.READ_CALENDAR");
expect(bundleInfo.reqPermissions[4]).assertEqual("ohos.permission.SYSTEM_FLOAT_WINDOW");
expect(bundleInfo.reqPermissions[5]).assertEqual("ohos.permission.USE_BLUETOOTH");
expect(bundleInfo.reqPermissionStates.length).assertEqual(6);
expect(bundleInfo.reqPermissionStates[0]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED);
expect(bundleInfo.reqPermissionStates[0]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED);
expect(bundleInfo.reqPermissionStates[1]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED);
expect(bundleInfo.reqPermissionStates[2]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED);
expect(bundleInfo.reqPermissionStates[2]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED);
expect(bundleInfo.reqPermissionStates[3]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED);
expect(bundleInfo.reqPermissionStates[4]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED);
expect(bundleInfo.reqPermissionStates[5]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED);
......
......@@ -46,29 +46,6 @@
"launchType": "standard"
}
],
"defPermissions": [
{
"name": "com.permission.CAMERA",
"grantMode": "system_grant",
"availableScope": ["signature"],
"label": "CAMERA permission",
"description": "CAMERA permission in detail"
},
{
"name": "com.permission.music",
"grantMode": "system_grant",
"availableScope": ["signature"],
"label": "music permission",
"description": "music permission in detail"
},
{
"name": "com.permission.WeChat",
"grantMode": "system_grant",
"availableScope": ["signature"],
"label": "WeChat permission",
"description": "WeChat permission in detail"
}
],
"reqPermissions": [
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
......
......@@ -77,9 +77,9 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.appInfo.supportedModes).assertEqual(0);
expect(datainfo.installTime).assertLarger(0);
expect(datainfo.updateTime).assertLarger(0);
expect(datainfo.reqPermissions[0]).assertEqual("com.permission.PERMISSION_A");
expect(datainfo.reqPermissionDetails[0].name).assertEqual("com.permission.PERMISSION_A");
expect(datainfo.reqPermissionDetails[0].reason).assertEqual("Need PERMISSION_A");
expect(datainfo.reqPermissions[0]).assertEqual("ohos.permission.USE_BLUETOOTH");
expect(datainfo.reqPermissionDetails[0].name).assertEqual("ohos.permission.USE_BLUETOOTH");
expect(datainfo.reqPermissionDetails[0].reason).assertEqual("Need USE_BLUETOOTH");
expect(datainfo.reqPermissionDetails[0].usedScene.abilities[0]).assertEqual(NAME1 + ".MainAbility");
expect(datainfo.reqPermissionDetails[0].usedScene.when).assertEqual("always");
expect(datainfo.compatibleVersion).assertEqual(5);
......@@ -1030,7 +1030,7 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.subType).assertEqual(demo.AbilitySubType.UNSPECIFIED);
expect(datainfo.orientation).assertEqual(demo.DisplayOrientation.UNSPECIFIED);
expect(datainfo.launchMode).assertEqual(demo.LaunchMode.STANDARD);
expect(datainfo.permissions[0]).assertEqual("com.permission.BMS_PERMISSION_CAMERA");
expect(datainfo.permissions[0]).assertEqual("ohos.permission.INTERNET");
expect(datainfo.applicationInfo.name).assertEqual(NAME1);
expect(datainfo.applicationInfo.description).assertEqual(APPLICATION_DESCRIPTION);
expect(datainfo.applicationInfo.descriptionId >= 0).assertTrue();
......
......@@ -66,34 +66,14 @@
}
}
],
"definePermissions":[
{
"availableLevel":"normal",
"description":"ALPHA description",
"distributedSceneEnable":true,
"grantMode":"user_grant",
"label":"ALPHA label",
"name":"ohos.permission.ALPHA",
"provisionEnable":true
},
{
"availableLevel":"normal",
"description":"BETA description",
"distributedSceneEnable":true,
"grantMode":"user_grant",
"label":"BETA label",
"name":"ohos.permission.BETA",
"provisionEnable":true
}
],
"reqPermissions":[
{
"name":"ohos.permission.ALPHA",
"reason":"use ohos.permission.ALPHA"
"name":"ohos.permission.READ_CALENDAR",
"reason":"use ohos.permission.READ_CALENDAR"
},
{
"name":"ohos.permission.BETA",
"reason":"use ohos.permission.BETA"
"name":"ohos.permission.MICROPHONE",
"reason":"use ohos.permission.MICROPHONE"
},
{
"name": "ohos.permission.KEEP_BACKGROUND_RUNNING",
......
......@@ -66,34 +66,14 @@
}
}
],
"definePermissions":[
{
"availableLevel":"normal",
"description":"ALPHA description",
"distributedSceneEnable":true,
"grantMode":"user_grant",
"label":"ALPHA label",
"name":"ohos.permission.ALPHA",
"provisionEnable":true
},
{
"availableLevel":"normal",
"description":"BETA description",
"distributedSceneEnable":true,
"grantMode":"user_grant",
"label":"BETA label",
"name":"ohos.permission.BETA",
"provisionEnable":true
}
],
"reqPermissions":[
{
"name":"ohos.permission.ALPHA",
"reason":"use ohos.permission.ALPHA"
"name":"ohos.permission.READ_CALENDAR",
"reason":"use ohos.permission.READ_CALENDAR"
},
{
"name":"ohos.permission.BETA",
"reason":"use ohos.permission.BETA"
"name":"ohos.permission.MICROPHONE",
"reason":"use ohos.permission.MICROPHONE"
},
{
"name": "ohos.permission.KEEP_BACKGROUND_RUNNING",
......
......@@ -66,34 +66,14 @@
}
}
],
"definePermissions":[
{
"availableLevel":"normal",
"description":"ALPHA description",
"distributedSceneEnable":true,
"grantMode":"user_grant",
"label":"ALPHA label",
"name":"ohos.permission.ALPHA",
"provisionEnable":true
},
{
"availableLevel":"normal",
"description":"BETA description",
"distributedSceneEnable":true,
"grantMode":"user_grant",
"label":"BETA label",
"name":"ohos.permission.BETA",
"provisionEnable":true
}
],
"reqPermissions":[
{
"name":"ohos.permission.ALPHA",
"reason":"use ohos.permission.ALPHA"
"name":"ohos.permission.READ_CALENDAR",
"reason":"use ohos.permission.READ_CALENDAR"
},
{
"name":"ohos.permission.BETA",
"reason":"use ohos.permission.BETA"
"name":"ohos.permission.MICROPHONE",
"reason":"use ohos.permission.MICROPHONE"
},
{
"name": "ohos.permission.KEEP_BACKGROUND_RUNNING",
......
......@@ -66,30 +66,10 @@
}
}
],
"definePermissions":[
{
"availableLevel":"normal",
"description":"ALPHA description",
"distributedSceneEnable":true,
"grantMode":"user_grant",
"label":"ALPHA label",
"name":"ohos.permission.ALPHA",
"provisionEnable":true
},
{
"availableLevel":"normal",
"description":"BETA description",
"distributedSceneEnable":true,
"grantMode":"user_grant",
"label":"BETA label",
"name":"ohos.permission.BETA",
"provisionEnable":true
}
],
"reqPermissions":[
{
"name":"ohos.permission.ALPHA",
"reason":"use ohos.permission.ALPHA"
"name":"ohos.permission.READ_CALENDAR",
"reason":"use ohos.permission.READ_CALENDAR"
},
{
"name": "ohos.permission.KEEP_BACKGROUND_RUNNING",
......
......@@ -66,30 +66,10 @@
}
}
],
"definePermissions":[
{
"availableLevel":"normal",
"description":"ALPHA description",
"distributedSceneEnable":true,
"grantMode":"user_grant",
"label":"ALPHA label",
"name":"ohos.permission.ALPHA",
"provisionEnable":true
},
{
"availableLevel":"normal",
"description":"BETA description",
"distributedSceneEnable":true,
"grantMode":"user_grant",
"label":"BETA label",
"name":"ohos.permission.BETA",
"provisionEnable":true
}
],
"reqPermissions":[
{
"name":"ohos.permission.ALPHA",
"reason":"use ohos.permission.ALPHA"
"name":"ohos.permission.READ_CALENDAR",
"reason":"use ohos.permission.READ_CALENDAR"
},
{
"name": "ohos.permission.KEEP_BACKGROUND_RUNNING",
......
......@@ -160,18 +160,6 @@
}
}
],
"defPermissions": [
{
"name": "com.permission.PERMISSION_THIRD1",
"grantMode": "user_grant",
"availableScope": ["signature"]
},
{
"name": "com.permission.PERMISSION_B",
"grantMode": "system_grant",
"availableScope": ["signature"]
}
],
"description":"$string:entry_description"
}
}
\ No newline at end of file
......@@ -61,17 +61,6 @@
}
}
],
"defPermissions": [
{
"availableScope": [
"signature"
],
"grantMode": "system_grant",
"name": "com.permission.BMS_PERMISSION_MUSIC",
"description": "BMS_PERMISSION_MUSIC permission in detail",
"label": "BMS_PERMISSION_MUSIC permission"
}
],
"description":"$string:entry_description"
}
}
\ No newline at end of file
......@@ -60,17 +60,6 @@
}
}
],
"defPermissions": [
{
"availableScope": [
"signature"
],
"grantMode": "system_grant",
"name": "com.permission.BMS_PERMISSION_CAMERA",
"description": "BMS_PERMISSION_CAMERA permission in detail",
"label": "BMS_PERMISSION_CAMERA permission"
}
],
"description":"$string:entry_description"
}
}
\ No newline at end of file
......@@ -45,7 +45,7 @@
"launchType": "standard",
"orientation": "unspecified",
"language": "C++",
"permissions":["com.permission.BMS_PERMISSION_CAMERA"],
"permissions":["ohos.permission.INTERNET"],
"metaData": {
"customizeData": [
{
......@@ -68,26 +68,10 @@
}
}
],
"defPermissions": [
{
"availableScope": [
"signature"
],
"grantMode": "system_grant",
"name": "com.permission.BMS_PERMISSION_CAMERA",
"description": "BMS_PERMISSION_CAMERA permission in detail",
"label": "BMS_PERMISSION_CAMERA permission"
},
{
"name": "com.permission.PERMISSION_A",
"grantMode": "system_grant",
"availableScope": ["signature"]
}
],
"reqPermissions": [
{
"name": "com.permission.PERMISSION_A",
"reason": "Need PERMISSION_A",
"name": "ohos.permission.USE_BLUETOOTH",
"reason": "Need USE_BLUETOOTH",
"usedScene": {
"ability": [
"com.example.myapplication1.MainAbility"
......
{"app": {"apiVersion": {"compatible": 5,"releaseType": "Beta1","target": 5},"vendor": "example","bundleName": "com.example.napi_test_suite10","version": {"code": 1,"name": "1.0"}},"deviceConfig": {"default": {"debug": true}},"module": {"abilities": [{"iconId": 16777218,"skills": [{"entities": ["entity.system.home","flag.home.intent.from.system"],"actions": ["action.system.home"]}],"descriptionId": 16777217,"labelId": 16777216,"icon": "$media:icon","name": "com.example.napi_test_suite.MainAbility","description": "$string:mainability_description","label": "$string:app_name","type": "page","launchType": "standard"}],"deviceType": ["phone"],"distro": {"moduleType": "entry","deliveryWithInstall": true,"moduleName": "entry"},"package": "com.example.napi_test_suite","defPermissions": [{"availableScope": ["signature"],"grantMode": "system_grant","name": "com.permission.CAMERA","description": "CAMERA permission in detail","label": "CAMERA permission"},{"availableScope": ["signature"],"grantMode": "system_grant","name": "com.permission.music","description": "music permission in detail","label": "music permission"},{"availableScope": ["signature"],"grantMode": "system_grant","name": "com.permission.WeChat","description": "WeChat permission in detail","label": "WeChat permission"}],"name": ".MyApplication","js": [{"pages": ["pages/index/index"],"name": "default","window": {"designWidth": 720,"autoDesignWidth": false}}]}}
\ No newline at end of file
{"app": {"apiVersion": {"compatible": 5,"releaseType": "Beta1","target": 5},"vendor": "example","bundleName": "com.example.napi_test_suite10","version": {"code": 1,"name": "1.0"}},"deviceConfig": {"default": {"debug": true}},"module": {"abilities": [{"iconId": 16777218,"skills": [{"entities": ["entity.system.home","flag.home.intent.from.system"],"actions": ["action.system.home"]}],"descriptionId": 16777217,"labelId": 16777216,"icon": "$media:icon","name": "com.example.napi_test_suite.MainAbility","description": "$string:mainability_description","label": "$string:app_name","type": "page","launchType": "standard"}],"deviceType": ["phone"],"distro": {"moduleType": "entry","deliveryWithInstall": true,"moduleName": "entry"},"package": "com.example.napi_test_suite","name": ".MyApplication","js": [{"pages": ["pages/index/index"],"name": "default","window": {"designWidth": 720,"autoDesignWidth": false}}]}}
\ No newline at end of file
......@@ -59,17 +59,6 @@
}
}
],
"defPermissions": [
{
"availableScope": [
"signature"
],
"grantMode": "system_grant",
"name": "com.permission.BMS_PERMISSION_WECHAT",
"description": "BMS_PERMISSION_WECHAT permission in detail",
"label": "BMS_PERMISSION_WECHAT permission"
}
],
"description":"$string:entry_description"
}
}
\ No newline at end of file
......@@ -66,17 +66,6 @@
}
}
],
"defPermissions": [
{
"availableScope": [
"signature"
],
"grantMode": "system_grant",
"name": "com.permission.BMS_PERMISSION_MUSIC",
"description": "BMS_PERMISSION_MUSIC permission in detail",
"label": "BMS_PERMISSION_MUSIC permission"
}
],
"description":"$string:entry_description"
}
}
\ No newline at end of file
......@@ -59,17 +59,6 @@
}
}
],
"defPermissions": [
{
"availableScope": [
"signature"
],
"grantMode": "system_grant",
"name": "com.permission.BMS_PERMISSION_CAMERA",
"description": "BMS_PERMISSION_CAMERA permission in detail",
"label": "BMS_PERMISSION_CAMERA permission"
}
],
"description":"$string:entry_description"
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册