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