summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_regular/src/cache_manager.cc
diff options
context:
space:
mode:
authorAKalinich-Luxoft <AKalinich@luxoft.com>2017-09-26 15:00:32 +0300
committerAKalinich-Luxoft <AKalinich@luxoft.com>2017-09-27 12:26:46 +0300
commitbfdcdd0f21dc83ffb8a607060d3392cad10406a4 (patch)
tree5da5ce3d356affed546283084ca90c4b18536128 /src/components/policy/policy_regular/src/cache_manager.cc
parentb99b6f58762c20f0018faa1fa9f23d568675b92c (diff)
downloadsdl_core-bfdcdd0f21dc83ffb8a607060d3392cad10406a4.tar.gz
Fix PTU applying for default app policy section
There was a problem with applying changes for applications which is registered with "default" policies and this policy group was updated after PTU. In this case permissions for already registered applications which is using these groups still have permissions as before update. Also default policy section was not updated after PTU with changes in this section. This issue is reproduced on EXTERNAL_PROPRIETARY flow only. To fix this issue there was removed code in CacheManager, which incorrectly assigns default policies to apps with "default" policies. Also there was a redundant code because default policies is unwrapped in PTU before its applying, so all specific application policies is already have actual new default policy permissions. In this case it is correct to assign to every app his own policies from PTU. Also there was updated logic in ProcessAppPolicyCheckResults() to perform all needed actions once per app, because its possible that results could contain sever results for one app_id.
Diffstat (limited to 'src/components/policy/policy_regular/src/cache_manager.cc')
-rw-r--r--src/components/policy/policy_regular/src/cache_manager.cc10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/components/policy/policy_regular/src/cache_manager.cc b/src/components/policy/policy_regular/src/cache_manager.cc
index 78674c81f3..f4fa573c1b 100644
--- a/src/components/policy/policy_regular/src/cache_manager.cc
+++ b/src/components/policy/policy_regular/src/cache_manager.cc
@@ -238,16 +238,6 @@ bool CacheManager::ApplyUpdate(const policy_table::Table& update_pt) {
pt_->policy_table.app_policies_section.apps[iter->first].set_to_null();
pt_->policy_table.app_policies_section.apps[iter->first].set_to_string(
"");
- } else if (policy::kDefaultId == (iter->second).get_string()) {
- policy_table::ApplicationPolicies::const_iterator iter_default =
- update_pt.policy_table.app_policies_section.apps.find(kDefaultId);
- if (update_pt.policy_table.app_policies_section.apps.end() ==
- iter_default) {
- LOG4CXX_ERROR(logger_, "The default section was not found in PTU");
- continue;
- }
- pt_->policy_table.app_policies_section.apps[iter->first] =
- iter_default->second;
} else {
pt_->policy_table.app_policies_section.apps[iter->first] = iter->second;
}