diff options
Diffstat (limited to 'src/components/policy/policy_external/src/policy_helper.cc')
-rw-r--r-- | src/components/policy/policy_external/src/policy_helper.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/components/policy/policy_external/src/policy_helper.cc b/src/components/policy/policy_external/src/policy_helper.cc index e8855bb11a..f81ce75d4c 100644 --- a/src/components/policy/policy_external/src/policy_helper.cc +++ b/src/components/policy/policy_external/src/policy_helper.cc @@ -841,10 +841,30 @@ bool ProcessFunctionalGroup::operator()(const StringsValueType& group_name) { undefined_group_consent_, does_require_user_consent); std::for_each(rpcs.begin(), rpcs.end(), filler); + const auto encryption_required = (*it).second.encryption_required; + FillEncryptionFlagForRpcs(encryption_required); } return true; } +void ProcessFunctionalGroup::FillEncryptionFlagForRpcs( + const EncryptionRequired encryption_required) { + auto update_encryption_required = + [](EncryptionRequired& current, const EncryptionRequired& incoming) { + if (!incoming.is_initialized()) { + return; + } + if (current.is_initialized() && *current) { + return; + } + current = incoming; + }; + for (auto& item : data_) { + update_encryption_required(item.second.require_encryption, + encryption_required); + } +} + GroupConsent ProcessFunctionalGroup::GetGroupState( const std::string& group_name) { std::vector<FunctionalGroupPermission>::const_iterator it = |