diff options
author | Andrey Oleynik <AOleynik@luxoft.com> | 2015-04-22 00:09:30 +0300 |
---|---|---|
committer | Andrey Oleynik <my@email.com> | 2015-04-23 16:36:55 +0300 |
commit | 20e9d369996207b7e8e9fc536f0d9f8de7a26423 (patch) | |
tree | 64da9d59169f217facd7aa8c9d32354d2469654f | |
parent | 8ae2b805873b08b72f4ef8262ab2d98973cca895 (diff) | |
download | smartdevicelink-20e9d369996207b7e8e9fc536f0d9f8de7a26423.tar.gz |
APPLINK-12666. Changed PTU processing to avoid premature loss of functional groups information.
Conflicts:
src/components/policy/src/policy/src/policy_manager_impl.cc
-rw-r--r-- | src/components/policy/src/policy/src/policy_manager_impl.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/components/policy/src/policy/src/policy_manager_impl.cc b/src/components/policy/src/policy/src/policy_manager_impl.cc index 28e737ac6..955dbf126 100644 --- a/src/components/policy/src/policy/src/policy_manager_impl.cc +++ b/src/components/policy/src/policy/src/policy_manager_impl.cc @@ -127,6 +127,13 @@ bool PolicyManagerImpl::LoadPT(const std::string& file, return false; } + // Checking of difference between PTU and current policy state + // Must to be done before PTU applying since it is possible, that functional + // groups, which had been present before are absent in PTU and will be + // removed after update. So in case of revoked groups system has to know + // names and ids of revoked groups before they will be removed. + CheckPermissionsChanges(pt_update, policy_table_snapshot); + // Replace current data with updated if (!cache_->ApplyUpdate(*pt_update)) { LOG4CXX_WARN(logger_, "Unsuccessful save of updated policy table."); @@ -137,16 +144,12 @@ bool PolicyManagerImpl::LoadPT(const std::string& file, listener_->OnCertificateUpdated(*(pt_update->policy_table.module_config.certificate)); } - - // Check permissions for applications, send notifications - CheckPermissionsChanges(pt_update, policy_table_snapshot); - std::map<std::string, StringArray> app_hmi_types; cache_->GetHMIAppTypeAfterUpdate(app_hmi_types); if (!app_hmi_types.empty()) { LOG4CXX_INFO(logger_, "app_hmi_types is full calling OnUpdateHMIAppType"); listener_->OnUpdateHMIAppType(app_hmi_types); - }else{ + } else { LOG4CXX_INFO(logger_, "app_hmi_types empty" << pt_content.size()); } |