diff options
Diffstat (limited to 'src/components/policy/policy_external/src/policy_manager_impl.cc')
-rw-r--r-- | src/components/policy/policy_external/src/policy_manager_impl.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/components/policy/policy_external/src/policy_manager_impl.cc b/src/components/policy/policy_external/src/policy_manager_impl.cc index e93eea3969..cd9954db57 100644 --- a/src/components/policy/policy_external/src/policy_manager_impl.cc +++ b/src/components/policy/policy_external/src/policy_manager_impl.cc @@ -696,6 +696,8 @@ const std::vector<std::string> PolicyManagerImpl::GetAppRequestTypes( if (kDeviceDisallowed == cache_->GetDeviceConsent(GetCurrentDeviceId(policy_app_id))) { cache_->GetAppRequestTypes(kPreDataConsentId, request_types); + } else if (cache_->IsDefaultPolicy(policy_app_id)) { + cache_->GetAppRequestTypes(kDefaultId, request_types); } else { cache_->GetAppRequestTypes(policy_app_id, request_types); } @@ -705,19 +707,29 @@ const std::vector<std::string> PolicyManagerImpl::GetAppRequestTypes( RequestType::State PolicyManagerImpl::GetAppRequestTypesState( const std::string& policy_app_id) const { LOG4CXX_AUTO_TRACE(logger_); + if (cache_->IsDefaultPolicy(policy_app_id)) { + return cache_->GetAppRequestTypesState(kDefaultId); + } return cache_->GetAppRequestTypesState(policy_app_id); } RequestSubType::State PolicyManagerImpl::GetAppRequestSubTypesState( const std::string& policy_app_id) const { LOG4CXX_AUTO_TRACE(logger_); + if (cache_->IsDefaultPolicy(policy_app_id)) { + return cache_->GetAppRequestSubTypesState(kDefaultId); + } return cache_->GetAppRequestSubTypesState(policy_app_id); } const std::vector<std::string> PolicyManagerImpl::GetAppRequestSubTypes( const std::string& policy_app_id) const { std::vector<std::string> request_subtypes; - cache_->GetAppRequestSubTypes(policy_app_id, request_subtypes); + if (cache_->IsDefaultPolicy(policy_app_id)) { + cache_->GetAppRequestSubTypes(kDefaultId, request_subtypes); + } else { + cache_->GetAppRequestSubTypes(policy_app_id, request_subtypes); + } return request_subtypes; } |