diff options
author | Alexander Kutsan <akutsan@luxoft.com> | 2017-08-22 18:37:42 +0300 |
---|---|---|
committer | Alexander Kutsan <akutsan@luxoft.com> | 2017-08-22 18:37:42 +0300 |
commit | 287a7dec6a40d5ab0b92cc480243b0d1d9a25e35 (patch) | |
tree | 229236e7e666ad232204491b5fbb0f59ba04d096 /src/components/policy | |
parent | ed87882cf04fc04d5cc2e18ffdcfe37c549c4433 (diff) | |
download | sdl_core-287a7dec6a40d5ab0b92cc480243b0d1d9a25e35.tar.gz |
Remove Promary RC group
Diffstat (limited to 'src/components/policy')
11 files changed, 0 insertions, 81 deletions
diff --git a/src/components/policy/policy_external/include/policy/policy_table/types.h b/src/components/policy/policy_external/include/policy/policy_table/types.h index 22cb071d04..a460db32db 100644 --- a/src/components/policy/policy_external/include/policy/policy_table/types.h +++ b/src/components/policy/policy_external/include/policy/policy_table/types.h @@ -176,7 +176,6 @@ struct ApplicationParams : PolicyBase { Optional<Integer<uint16_t, 0, 65225> > memory_kb; Optional<Integer<uint32_t, 0, UINT_MAX> > heart_beat_timeout_ms; #ifdef SDL_REMOTE_CONTROL - Optional<Strings> groups_primaryRC; mutable Optional<ModuleTypes> moduleType; #endif // SDL_REMOTE_CONTROL diff --git a/src/components/policy/policy_external/src/access_remote_impl.cc b/src/components/policy/policy_external/src/access_remote_impl.cc index 410c5f7520..bfb9f94c6d 100644 --- a/src/components/policy/policy_external/src/access_remote_impl.cc +++ b/src/components/policy/policy_external/src/access_remote_impl.cc @@ -203,10 +203,6 @@ const policy_table::AppHMITypes& AccessRemoteImpl::HmiTypes( const policy_table::Strings& AccessRemoteImpl::GetGroups(const Subject& who) { LOG4CXX_AUTO_TRACE(logger_); - if (IsAppRemoteControl(who)) { - return *cache_->pt_->policy_table.app_policies_section.apps[who.app_id] - .groups_primaryRC; - } return cache_->GetGroups(who.app_id); } diff --git a/src/components/policy/policy_external/src/policy_helper.cc b/src/components/policy/policy_external/src/policy_helper.cc index 9652541c7d..913a599bea 100644 --- a/src/components/policy/policy_external/src/policy_helper.cc +++ b/src/components/policy/policy_external/src/policy_helper.cc @@ -896,15 +896,6 @@ void ProccessAppGroups::operator()( if (i == new_apps_.end() && default_ != new_apps_.end()) { i = default_; } - if (i != new_apps_.end()) { - if (HaveGroupsChanged(i->second.groups_primaryRC, - app.second.groups_primaryRC)) { - LOG4CXX_DEBUG(logger_, - "Primary groups for " << app.first << " have changed"); - - pm_->OnPrimaryGroupsChanged(app.first); - } - } } #endif // SDL_REMOTE_CONTROL diff --git a/src/components/policy/policy_external/src/policy_table/types.cc b/src/components/policy/policy_external/src/policy_table/types.cc index dd77ed2141..e66b2cb561 100644 --- a/src/components/policy/policy_external/src/policy_table/types.cc +++ b/src/components/policy/policy_external/src/policy_table/types.cc @@ -241,7 +241,6 @@ ApplicationParams::ApplicationParams(const Json::Value* value__) , memory_kb(impl::ValueMember(value__, "memory_kb"), 0) , heart_beat_timeout_ms(impl::ValueMember(value__, "heart_beat_timeout_ms")) #ifdef SDL_REMOTE_CONTROL - , groups_primaryRC(impl::ValueMember(value__, "groups_primaryRC")) , moduleType(impl::ValueMember(value__, "moduleType")) #endif // SDL_REMOTE_CONTROL { @@ -256,7 +255,6 @@ Json::Value ApplicationParams::ToJsonValue() const { impl::WriteJsonField( "heart_beat_timeout_ms", heart_beat_timeout_ms, &result__); #ifdef SDL_REMOTE_CONTROL - impl::WriteJsonField("groups_primaryRC", groups_primaryRC, &result__); impl::WriteJsonField("moduleType", moduleType, &result__); #endif // SDL_REMOTE_CONTROL return result__; @@ -281,9 +279,6 @@ bool ApplicationParams::is_valid() const { return false; } #ifdef SDL_REMOTE_CONTROL - if (!groups_primaryRC.is_valid()) { - return false; - } if (!moduleType.is_valid()) { return false; } @@ -315,9 +310,6 @@ bool ApplicationParams::struct_empty() const { return false; } #ifdef SDL_REMOTE_CONTROL - if (groups_primaryRC.is_initialized()) { - return false; - } if (moduleType.is_initialized()) { return false; } @@ -366,10 +358,6 @@ void ApplicationParams::ReportErrors(rpc::ValidationReport* report__) const { } #ifdef SDL_REMOTE_CONTROL - if (!groups_primaryRC.is_valid()) { - groups_primaryRC.ReportErrors( - &report__->ReportSubobject("groups_primaryRC")); - } if (!moduleType.is_valid()) { moduleType.ReportErrors(&report__->ReportSubobject("moduleType")); } @@ -383,7 +371,6 @@ void ApplicationParams::SetPolicyTableType(PolicyTableType pt_type) { memory_kb.SetPolicyTableType(pt_type); heart_beat_timeout_ms.SetPolicyTableType(pt_type); #ifdef SDL_REMOTE_CONTROL - groups_primaryRC.SetPolicyTableType(pt_type); moduleType.SetPolicyTableType(pt_type); #endif // SDL_REMOTE_CONTROL } diff --git a/src/components/policy/policy_external/src/sql_pt_representation.cc b/src/components/policy/policy_external/src/sql_pt_representation.cc index 8dbf113fbc..b5d04be8c2 100644 --- a/src/components/policy/policy_external/src/sql_pt_representation.cc +++ b/src/components/policy/policy_external/src/sql_pt_representation.cc @@ -766,9 +766,6 @@ bool SQLPTRepresentation::GatherApplicationPoliciesSection( } #ifdef SDL_REMOTE_CONTROL - if (!GatherAppGroupPrimary(app_id, &*params.groups_primaryRC)) { - return false; - } bool denied = false; if (!GatherRemoteControlDenied(app_id, &denied)) { return false; @@ -1063,9 +1060,6 @@ bool SQLPTRepresentation::SaveSpecificAppPolicy( } #ifdef SDL_REMOTE_CONTROL - if (!SaveAppGroupPrimary(app.first, *app.second.groups_primaryRC)) { - return false; - } bool denied = !app.second.moduleType->is_initialized(); if (!SaveRemoteControlDenied(app.first, denied) || @@ -1988,12 +1982,6 @@ bool SQLPTRepresentation::SetDefaultPolicy(const std::string& app_id) { policy_table::Strings default_groups; bool ret = (GatherAppGroup(kDefaultId, &default_groups) && SaveAppGroup(app_id, default_groups)); -#ifdef SDL_REMOTE_CONTROL - policy_table::Strings groups_primary; - ret = ret && (GatherAppGroupPrimary(kDefaultId, &groups_primary) && - SaveAppGroupPrimary(app_id, groups_primary)); -#endif // SDL_REMOTE_CONTROL - if (ret) { return SetIsDefault(app_id, true); } diff --git a/src/components/policy/policy_regular/include/policy/policy_table/types.h b/src/components/policy/policy_regular/include/policy/policy_table/types.h index 215d7bf9cf..b1e9dd5401 100644 --- a/src/components/policy/policy_regular/include/policy/policy_table/types.h +++ b/src/components/policy/policy_regular/include/policy/policy_table/types.h @@ -143,7 +143,6 @@ struct ApplicationParams : PolicyBase { Optional<Integer<uint32_t, 0, UINT_MAX> > heart_beat_timeout_ms; Optional<String<0, 255> > certificate; #ifdef SDL_REMOTE_CONTROL - Optional<Strings> groups_primaryRC; mutable Optional<ModuleTypes> moduleType; #endif // SDL_REMOTE_CONTROL diff --git a/src/components/policy/policy_regular/src/access_remote_impl.cc b/src/components/policy/policy_regular/src/access_remote_impl.cc index 029bbfaa71..f77a8e02cd 100644 --- a/src/components/policy/policy_regular/src/access_remote_impl.cc +++ b/src/components/policy/policy_regular/src/access_remote_impl.cc @@ -180,11 +180,6 @@ const policy_table::AppHMITypes& AccessRemoteImpl::HmiTypes( const policy_table::Strings& AccessRemoteImpl::GetGroups(const Subject& who) { LOG4CXX_AUTO_TRACE(logger_); - if (IsAppRemoteControl(who)) { - return *cache_->pt() - ->policy_table.app_policies_section.apps[who.app_id] - .groups_primaryRC; - } return cache_->GetGroups(who.app_id); } diff --git a/src/components/policy/policy_regular/src/policy_helper.cc b/src/components/policy/policy_regular/src/policy_helper.cc index dd094fb626..d82d5396ca 100644 --- a/src/components/policy/policy_regular/src/policy_helper.cc +++ b/src/components/policy/policy_regular/src/policy_helper.cc @@ -833,15 +833,6 @@ void ProccessAppGroups::operator()( if (i == new_apps_.end() && default_ != new_apps_.end()) { i = default_; } - if (i != new_apps_.end()) { - if (HaveGroupsChanged(i->second.groups_primaryRC, - app.second.groups_primaryRC)) { - LOG4CXX_DEBUG(logger_, - "Primary groups for " << app.first << " have changed"); - - pm_->OnPrimaryGroupsChanged(app.first); - } - } } #endif // SDL_REMOTE_CONTROL diff --git a/src/components/policy/policy_regular/src/policy_table/types.cc b/src/components/policy/policy_regular/src/policy_table/types.cc index 83dc2ffe17..45afd91419 100644 --- a/src/components/policy/policy_regular/src/policy_table/types.cc +++ b/src/components/policy/policy_regular/src/policy_table/types.cc @@ -168,7 +168,6 @@ ApplicationParams::ApplicationParams(const Json::Value* value__) , heart_beat_timeout_ms(impl::ValueMember(value__, "heart_beat_timeout_ms")) , certificate(impl::ValueMember(value__, "certificate"), "not_specified") #ifdef SDL_REMOTE_CONTROL - , groups_primaryRC(impl::ValueMember(value__, "groups_primaryRC")) , moduleType(impl::ValueMember(value__, "moduleType")) #endif // SDL_REMOTE_CONTROL { @@ -184,7 +183,6 @@ Json::Value ApplicationParams::ToJsonValue() const { impl::WriteJsonField( "heart_beat_timeout_ms", heart_beat_timeout_ms, &result__); #ifdef SDL_REMOTE_CONTROL - impl::WriteJsonField("groups_primaryRC", groups_primaryRC, &result__); impl::WriteJsonField("moduleType", moduleType, &result__); #endif // SDL_REMOTE_CONTROL return result__; @@ -215,9 +213,6 @@ bool ApplicationParams::is_valid() const { return false; } #ifdef SDL_REMOTE_CONTROL - if (!groups_primaryRC.is_valid()) { - return false; - } if (!moduleType.is_valid()) { return false; } @@ -255,9 +250,6 @@ bool ApplicationParams::struct_empty() const { return false; } #ifdef SDL_REMOTE_CONTROL - if (groups_primaryRC.is_initialized()) { - return false; - } if (moduleType.is_initialized()) { return false; } @@ -295,10 +287,6 @@ void ApplicationParams::ReportErrors(rpc::ValidationReport* report__) const { certificate.ReportErrors(&report__->ReportSubobject("certificate")); } #ifdef SDL_REMOTE_CONTROL - if (!groups_primaryRC.is_valid()) { - groups_primaryRC.ReportErrors( - &report__->ReportSubobject("groups_primaryRC")); - } if (!moduleType.is_valid()) { moduleType.ReportErrors(&report__->ReportSubobject("moduleType")); } @@ -314,7 +302,6 @@ void ApplicationParams::SetPolicyTableType(PolicyTableType pt_type) { heart_beat_timeout_ms.SetPolicyTableType(pt_type); certificate.SetPolicyTableType(pt_type); #ifdef SDL_REMOTE_CONTROL - groups_primaryRC.SetPolicyTableType(pt_type); moduleType.SetPolicyTableType(pt_type); #endif // SDL_REMOTE_CONTROL } diff --git a/src/components/policy/policy_regular/src/sql_pt_representation.cc b/src/components/policy/policy_regular/src/sql_pt_representation.cc index 682c74d0bf..06cbc03dfb 100644 --- a/src/components/policy/policy_regular/src/sql_pt_representation.cc +++ b/src/components/policy/policy_regular/src/sql_pt_representation.cc @@ -706,9 +706,6 @@ bool SQLPTRepresentation::GatherApplicationPoliciesSection( return false; } #ifdef SDL_REMOTE_CONTROL - if (!GatherAppGroupPrimary(app_id, &*params.groups_primaryRC)) { - return false; - } bool denied = false; if (!GatherRemoteControlDenied(app_id, &denied)) { return false; @@ -966,10 +963,6 @@ bool SQLPTRepresentation::SaveSpecificAppPolicy( return false; } #ifdef SDL_REMOTE_CONTROL - if (!SaveAppGroupPrimary(app.first, *app.second.groups_primaryRC)) { - return false; - } - bool denied = !app.second.moduleType->is_initialized(); if (!SaveRemoteControlDenied(app.first, denied) || !SaveModuleType(app.first, *app.second.moduleType)) { @@ -1894,12 +1887,6 @@ bool SQLPTRepresentation::SetDefaultPolicy(const std::string& app_id) { bool ret = (GatherAppGroup(kDefaultId, &default_groups) && SaveAppGroup(app_id, default_groups)); -#ifdef SDL_REMOTE_CONTROL - policy_table::Strings groups_primary; - ret = ret && (GatherAppGroupPrimary(kDefaultId, &groups_primary) && - SaveAppGroupPrimary(app_id, groups_primary)); -#endif // SDL_REMOTE_CONTROL - if (ret) { return SetIsDefault(app_id, true); } diff --git a/src/components/policy/policy_regular/test/access_remote_impl_test.cc b/src/components/policy/policy_regular/test/access_remote_impl_test.cc index 65ed4fdf13..69cd6f576e 100644 --- a/src/components/policy/policy_regular/test/access_remote_impl_test.cc +++ b/src/components/policy/policy_regular/test/access_remote_impl_test.cc @@ -85,7 +85,6 @@ TEST(AccessRemoteImplTest, GetGroups) { policy_table::ApplicationPolicies& apps = access_remote.cache_->pt_->policy_table.app_policies_section.apps; apps["1234"].groups.push_back("group_default"); - apps["1234"].groups_primaryRC->push_back("group_primary"); apps["1234"].AppHMIType->push_back(policy_table::AHT_MEDIA); // Default groups |