From: liwei Date: Sat, 9 May 2020 05:27:27 +0000 (+0800) Subject: [Service] Change privilege condition for application.launch / launchAppControl X-Git-Tag: accepted/tizen/unified/20200512.052717~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51e7c8723269e201bd458c58ec6fe14b25ed91b5;p=platform%2Fframework%2Fweb%2Fwrtjs.git [Service] Change privilege condition for application.launch / launchAppControl 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 --- diff --git a/wrt_app/service/access_control_manager.js b/wrt_app/service/access_control_manager.js index 6dd0530..b0270b5 100644 --- a/wrt_app/service/access_control_manager.js +++ b/wrt_app/service/access_control_manager.js @@ -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")) {