[Service] Change privilege condition for application.launch / launchAppControl 40/232940/2
authorliwei <wei90727.li@samsung.com>
Sat, 9 May 2020 05:27:27 +0000 (13:27 +0800)
committerliwei <wei90727.li@samsung.com>
Mon, 11 May 2020 01:46:09 +0000 (09:46 +0800)
Confirmed with privilege member, in privilege db, If declare an application.launch
privilege, the app will not have an application.launch privilege, but an
appmanager.launch privilege, so add "appmanager.launch" in privilege precondition,
otherwise service app can not use tizen.application.launch() /
tizen.application.launchAppControl().

Change-Id: I33b08d9221e718179228490086ab230884152c9b
Signed-off-by: liwei <wei90727.li@samsung.com>
wrt_app/service/access_control_manager.js

index 6dd0530..b0270b5 100644 (file)
@@ -17,10 +17,11 @@ function initialize(permissions, sandbox) {
       console.log('The application.read permission is missing.');
     }
   }
-  if (!permissions.includes("http://tizen.org/privilege/application.launch")) {
+  if (!permissions.includes("http://tizen.org/privilege/application.launch") &&
+      !permissions.includes("http://tizen.org/privilege/appmanager.launch")) {
     tizen.application.launch =
     tizen.application.launchAppControl = function() {
-      console.log('The application.launch permission is missing.');
+      console.log('The application.launch and appmanager.launch permission is missing.');
     }
   }
   if (!permissions.includes("http://tizen.org/privilege/application.info")) {