diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsaccesstokentest/src/main/js/test/ActsBmsAccessTokenTest.test.js b/bundlemanager/bundle_standard/bundlemanager/actsbmsaccesstokentest/src/main/js/test/ActsBmsAccessTokenTest.test.js index 876541c79d1188d1dcbf59e77ffca59dd9a15c70..1320bd8beefef838ebb8898e27ab1207afa15c15 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsaccesstokentest/src/main/js/test/ActsBmsAccessTokenTest.test.js +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsaccesstokentest/src/main/js/test/ActsBmsAccessTokenTest.test.js @@ -63,14 +63,12 @@ describe('ActsBmsAccessTokenTest', function () { await bundle.getBundleInfo(BUNDLE_NAME3, bundle.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) .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.reqPermissionStates.length).assertEqual(3); + expect(bundleInfo.reqPermissions.length).assertEqual(2); + expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.DISTRIBUTED_DATASYNC"); + expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING"); + expect(bundleInfo.reqPermissionStates.length).assertEqual(2); expect(bundleInfo.reqPermissionStates[0]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED); - expect(bundleInfo.reqPermissionStates[1]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED); - expect(bundleInfo.reqPermissionStates[2]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED); + expect(bundleInfo.reqPermissionStates[1]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED); done(); }).catch((err) => { expect(err).assertFail(); @@ -87,18 +85,16 @@ describe('ActsBmsAccessTokenTest', function () { await bundle.getBundleInfo(BUNDLE_NAME2, bundle.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) .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[3]).assertEqual("ohos.permission.USE_BLUETOOTH"); - expect(bundleInfo.reqPermissions[4]).assertEqual("ohos.permission.VIBRATE"); - 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[2]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED); + expect(bundleInfo.reqPermissions.length).assertEqual(4); + 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.USE_BLUETOOTH"); + expect(bundleInfo.reqPermissions[3]).assertEqual("ohos.permission.VIBRATE"); + expect(bundleInfo.reqPermissionStates.length).assertEqual(4); + 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[3]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED); - expect(bundleInfo.reqPermissionStates[4]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED); done(); }).catch((err) => { expect(err).assertFail(); @@ -115,20 +111,18 @@ describe('ActsBmsAccessTokenTest', function () { await bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) .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[4]).assertEqual("ohos.permission.USE_BLUETOOTH"); - expect(bundleInfo.reqPermissions[5]).assertEqual("ohos.permission.VIBRATE"); - expect(bundleInfo.reqPermissionStates.length).assertEqual(6); + expect(bundleInfo.reqPermissions.length).assertEqual(5); + expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.DISTRIBUTED_DATASYNC"); + expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING"); + expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.LOCATION_IN_BACKGROUND"); + expect(bundleInfo.reqPermissions[3]).assertEqual("ohos.permission.USE_BLUETOOTH"); + expect(bundleInfo.reqPermissions[4]).assertEqual("ohos.permission.VIBRATE"); + expect(bundleInfo.reqPermissionStates.length).assertEqual(5); expect(bundleInfo.reqPermissionStates[0]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED); - expect(bundleInfo.reqPermissionStates[1]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED); - expect(bundleInfo.reqPermissionStates[2]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED); - expect(bundleInfo.reqPermissionStates[3]).assertEqual(bundle.GrantStatus.PERMISSION_DENIED); + expect(bundleInfo.reqPermissionStates[1]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED); + 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); - expect(bundleInfo.reqPermissionStates[5]).assertEqual(bundle.GrantStatus.PERMISSION_GRANTED); done(); }).catch((err) => { expect(err).assertFail(); diff --git a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/config.json b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/config.json index d40bf5e8118628465f95cc16c2db826e94a12705..0cdbac17d399fbd439dcada34cef1645f9126747 100644 --- a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/config.json +++ b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/config.json @@ -67,34 +67,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.BETA", - "reason":"use ohos.permission.BETA" + "name":"ohos.permission.DISTRIBUTED_DATASYNC", + "reason":"use ohos.permission.DISTRIBUTED_DATASYNC" }, { "name": "ohos.permission.KEEP_BACKGROUND_RUNNING", diff --git a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/config.json b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/config.json index a386bf07254efae994638cd36eac5010b17df1c1..8c8a50bf07db8e2690f949631165ace7254f8e13 100644 --- a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/config.json +++ b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/config.json @@ -67,34 +67,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.BETA", - "reason":"use ohos.permission.BETA" + "name":"ohos.permission.DISTRIBUTED_DATASYNC", + "reason":"use ohos.permission.DISTRIBUTED_DATASYNC" }, { "name": "ohos.permission.KEEP_BACKGROUND_RUNNING", diff --git a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenone/src/main/config.json b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenone/src/main/config.json index ec79f8a8534201cd6b523ebc24049cb94c619555..e9cac756ffb2e7fa8e10a21f50a3ddf35d839a46 100644 --- a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenone/src/main/config.json +++ b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenone/src/main/config.json @@ -67,34 +67,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.BETA", - "reason":"use ohos.permission.BETA" + "name":"ohos.permission.DISTRIBUTED_DATASYNC", + "reason":"use ohos.permission.DISTRIBUTED_DATASYNC" }, { "name": "ohos.permission.KEEP_BACKGROUND_RUNNING", diff --git a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenthree/src/main/config.json b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenthree/src/main/config.json index bb4e6eef4ff7ff8578f8327a3fe31347134c7980..1c736b7b17c0db3276fefbee6edd6e51c23ad793 100644 --- a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenthree/src/main/config.json +++ b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenthree/src/main/config.json @@ -67,31 +67,7 @@ } } ], - "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.KEEP_BACKGROUND_RUNNING", "reason": "use ohos.permission.KEEP_BACKGROUND_RUNNING" diff --git a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokentwo/src/main/config.json b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokentwo/src/main/config.json index f9480aebc045aff04e3ca6a9911a5322875de2df..e1393dafd830e6610ea70f59f4e2d528a77a77c6 100644 --- a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokentwo/src/main/config.json +++ b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsaccesstokentwo/src/main/config.json @@ -67,31 +67,7 @@ } } ], - "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.KEEP_BACKGROUND_RUNNING", "reason": "use ohos.permission.KEEP_BACKGROUND_RUNNING" diff --git a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsmodulenameone/src/main/config.json b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsmodulenameone/src/main/config.json index 88fdf0be0ea963283bcfce4a3e72dfcaa4d2978e..c584e50084390089c6640f8df4f4a1f75f74a7c9 100644 --- a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsmodulenameone/src/main/config.json +++ b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsmodulenameone/src/main/config.json @@ -67,34 +67,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.BETA", - "reason":"use ohos.permission.BETA" + "name":"ohos.permission.DISTRIBUTED_DATASYNC", + "reason":"use ohos.permission.DISTRIBUTED_DATASYNC" }, { "name": "ohos.permission.KEEP_BACKGROUND_RUNNING", diff --git a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsmodulenametwo/src/main/config.json b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsmodulenametwo/src/main/config.json index f316a0a99ce7a48f9dfe8342dd583803b7bf5fc2..e1df55808acc9740368fbbf20e2e1529fa9f8317 100644 --- a/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsmodulenametwo/src/main/config.json +++ b/bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsmodulenametwo/src/main/config.json @@ -67,34 +67,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.BETA", - "reason":"use ohos.permission.BETA" + "name":"ohos.permission.DISTRIBUTED_DATASYNC", + "reason":"use ohos.permission.DISTRIBUTED_DATASYNC" }, { "name": "ohos.permission.KEEP_BACKGROUND_RUNNING", diff --git a/security/access_token/AccessTokenTest_Normal_js/src/main/config.json b/security/access_token/AccessTokenTest_Normal_js/src/main/config.json index 5e7272826e789a8d1448052bcea862967d3e69ff..98158d36e26a87b2ae99e4a391f44b1e6a48dc03 100644 --- a/security/access_token/AccessTokenTest_Normal_js/src/main/config.json +++ b/security/access_token/AccessTokenTest_Normal_js/src/main/config.json @@ -17,8 +17,8 @@ "package": "ohos.acts.security.access_token.normal", "name": ".entry", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "distro": { @@ -26,34 +26,9 @@ "moduleName": "entry", "moduleType": "entry" }, - "definePermissions": [ - { - "name": "ohos.permission.ALPHA", - "grantMode": "user_grant", - "availableLevel": "system_basic", - "provisionEnable": true, - "distributedSceneEnable": true, - "label": "ALPHA label", - "description": "ALPHA description" - }, - { - "name": "ohos.permission.BETA", - "grantMode": "system_grant", - "availableLevel": "system_basic", - "provisionEnable": true, - "distributedSceneEnable": true, - "label": "BETA label", - "description": "BETA description" - } - ], "reqPermissions": [ { - "name": "ohos.permission.ALPHA", - "reason": "use ohos.permission.ALPHA" - }, - { - "name": "ohos.permission.BETA", - "reason": "use ohos.permission.BETA" + "name": "ohos.permission.DISTRIBUTED_DATASYNC" }, { "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", diff --git a/security/access_token/AccessTokenTest_Normal_js/src/main/js/test/AccessToken.test.js b/security/access_token/AccessTokenTest_Normal_js/src/main/js/test/AccessToken.test.js index 4fcd8e979357bf68cbac4f3d6a92ddd627895eaa..17742630cc8af034f594a1676a7ae16a30babb3b 100644 --- a/security/access_token/AccessTokenTest_Normal_js/src/main/js/test/AccessToken.test.js +++ b/security/access_token/AccessTokenTest_Normal_js/src/main/js/test/AccessToken.test.js @@ -35,8 +35,8 @@ const TIMEOUT = 5000; const ERR_PARAM_INVALID = 12100001; const DEFAULT_PERMISSION_FALG = 0; -var permissionNameUser = "ohos.permission.ALPHA"; -var permissionNameSystem = "ohos.permission.BETA"; +var permissionNameUser = "ohos.permission.DISTRIBUTED_DATASYNC"; +var permissionNameSystem = "ohos.permission.GET_BUNDLE_INFO"; var tokenID = undefined; export default function AccessTokenTest() { describe('AccessTokenTest', function () {