Reworking handling privileges for hybrid application 61/90561/5
authorTomasz Iwanek <t.iwanek@samsung.com>
Fri, 30 Sep 2016 08:07:13 +0000 (10:07 +0200)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Thu, 3 Nov 2016 13:48:35 +0000 (06:48 -0700)
commit0ef8a4fec09d222efd16fd595a57f2e71a1ab264
treeaaa8ecbd6cae27f26d879a9b09eba668255b6406
parent58317277b6f3775ee6fc3d56e83b81be220f7848
Reworking handling privileges for hybrid application

This patch keeps single list of privileges (stored in
manifest_x) and filters privileges when registring
security rules of applications. Following changed:
 - generated platform manifest xml contains <privilege>
   tags with 'type' atttibute set to 'tpk' or 'wgt',
 - in case of absence of attribute, its default value
   is 'tpk',
 - manifest_x changes privilege type from GList of char*
   to GList of privilege_x. Structure named 'privilege_x'
   contain parsed privilege type,
 - although there is one privilege list, given the fact
   that privilege now have type, native and web privileges
   should be registered in native or web apps only.

Verification:
 - no regression in tpk/wgt smoke tests,
 - install hybrid app with native and web privileges
   and check generated manifest file for privileges,
 - install web app with privileges and check generated
   manifest file,
 - install web app without privileges and check generated
   manifest file -> default privileges should be added.

Submit together:
 - https://review.tizen.org/gerrit/#/c/90540/
 - https://review.tizen.org/gerrit/#/c/90543/
 - https://review.tizen.org/gerrit/#/c/90544/
 - https://review.tizen.org/gerrit/#/c/90546/
 - https://review.tizen.org/gerrit/#/c/90561/

Change-Id: I4ec7c8714a55917dbda665bf2a1c08ca30ce3f97
src/hybrid/hybrid_installer.cc
src/unit_tests/manifest_test.cc
src/wgt/step/configuration/step_parse.cc
src/wgt/step/pkgmgr/step_generate_xml.cc
src/wgt/step/security/step_add_default_privileges.cc
src/wgt/step/security/step_check_extension_privileges.cc
src/wgt/step/security/step_check_extension_privileges.h
src/wgt/step/security/step_check_wgt_ime_privilege.cc
src/wgt/wgt_installer.cc