Change implement of policy (CSP, allow-navigation, access)
authorJihoon Chung <jihoon.chung@samsung.com>
Fri, 28 Jun 2013 15:46:31 +0000 (00:46 +0900)
committerJihoon Chung <jihoon.chung@samsung.com>
Fri, 28 Jun 2013 16:00:44 +0000 (01:00 +0900)
[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

index b8db386..7834597 100644 (file)
@@ -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