diff options
author | JackLivio <jack@livio.io> | 2018-09-26 13:23:50 -0400 |
---|---|---|
committer | JackLivio <jack@livio.io> | 2018-09-26 13:23:50 -0400 |
commit | f369467c3f1cd91b1a432598dcf96d62e2c33735 (patch) | |
tree | 0d9564b579af5ed3ffc550bf7513995cef69952e | |
parent | 461f76b129e998d4b60540491684c348dd5c27e2 (diff) | |
download | sdl_core-fix/module_type_default_policies_only.tar.gz |
Check if app uses default policies for moduleTypefix/module_type_default_policies_only
-rw-r--r-- | src/components/policy/policy_external/src/access_remote_impl.cc | 9 |
1 files changed, 7 insertions, 2 deletions
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 26c8c5e38e..2a200d0479 100644 --- a/src/components/policy/policy_external/src/access_remote_impl.cc +++ b/src/components/policy/policy_external/src/access_remote_impl.cc @@ -99,8 +99,13 @@ bool AccessRemoteImpl::CheckModuleType(const PTString& app_id, return false; } - const policy_table::ApplicationParams& app = - cache_->pt_->policy_table.app_policies_section.apps[app_id]; + policy_table::ApplicationParams app; + if (cache_->IsDefaultPolicy(app_id)) { + app = cache_->pt_->policy_table.app_policies_section.apps[kDefaultId]; + } else { + app = cache_->pt_->policy_table.app_policies_section.apps[app_id]; + } + if (!app.moduleType.is_initialized()) { return false; } |