From 6c5d4c1d35675359e0f3ff954bcac8d17ddcec35 Mon Sep 17 00:00:00 2001 From: Jihoon Chung Date: Sat, 29 Jun 2013 00:46:31 +0900 Subject: [PATCH] Change implement of policy (CSP, allow-navigation, access) [Issue#] N/A [Problem] N/A [Cause] N/A [Solution] If platform version is 2.2, preferred CSP, allow-navigation than access Core spec 0104, 0105 will be changed [SCMRequest] N/A Change-Id: Ib41333c730e9c1ea54123411e8d803c4326fb3b4 --- src/jobs/widget_install/task_widget_config.cpp | 41 +++----------------------- 1 file changed, 4 insertions(+), 37 deletions(-) diff --git a/src/jobs/widget_install/task_widget_config.cpp b/src/jobs/widget_install/task_widget_config.cpp index b8db386..7834597 100644 --- a/src/jobs/widget_install/task_widget_config.cpp +++ b/src/jobs/widget_install/task_widget_config.cpp @@ -428,46 +428,13 @@ void TaskWidgetConfig::ProcessSecurityModel() bool isSecurityModelV1 = false; bool isSecurityModelV2 = false; - std::string securityModelV2supportedVersion = "2.2"; WrtDB::ConfigParserData &data = m_installContext.widgetConfig.configInfo; - // Parse required version - long majorWidget = 0, minorWidget = 0, microWidget = 0; - if (!parseVersionString(DPL::ToUTF8String(*data.tizenMinVersionRequired), - majorWidget, - minorWidget, - microWidget)) - { - ThrowMsg(Exceptions::NotAllowed, "Wrong version string"); - } - - // Parse since version (CSP & allow-navigation start to support since 2.2) - long majorSupported = 0, minorSupported = 0, microSupported = 0; - if (!parseVersionString(securityModelV2supportedVersion, - majorSupported, - minorSupported, - microSupported)) - { - ThrowMsg(Exceptions::NotAllowed, "Wrong version string"); - } - - if (majorWidget < majorSupported || - (majorWidget == majorSupported && minorWidget < minorSupported) || - (majorWidget == majorSupported && minorWidget == minorSupported - && microWidget < microSupported)) + if (!data.cspPolicy.IsNull() || + !data.cspPolicyReportOnly.IsNull() || + !data.allowNavigationInfoList.empty()) { - // Under 2.2, clear v2 data - data.cspPolicy = DPL::OptionalString::Null; - data.cspPolicyReportOnly = DPL::OptionalString::Null; - data.allowNavigationInfoList.clear(); - } else { - // More than 2.2, if v2 is defined, clear v1 data - if (!data.cspPolicy.IsNull() || - !data.cspPolicyReportOnly.IsNull() || - !data.allowNavigationInfoList.empty()) - { - data.accessInfoSet.clear(); - } + data.accessInfoSet.clear(); } // WARP is V1 -- 2.7.4