diff options
Diffstat (limited to 'src/components/policy/policy_external/src/sql_pt_representation.cc')
-rw-r--r-- | src/components/policy/policy_external/src/sql_pt_representation.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/components/policy/policy_external/src/sql_pt_representation.cc b/src/components/policy/policy_external/src/sql_pt_representation.cc index 1bb0cf0fa1..b6d63bb7bf 100644 --- a/src/components/policy/policy_external/src/sql_pt_representation.cc +++ b/src/components/policy/policy_external/src/sql_pt_representation.cc @@ -645,6 +645,10 @@ bool SQLPTRepresentation::GatherFunctionalGroupings( *rpcs_tbl.user_consent_prompt = func_group.GetString(2); } + if (!func_group.IsNull(3)) { + *rpcs_tbl.encryption_required = func_group.GetBoolean(3); + } + const int group_id = func_group.GetInteger(0); rpcs.Bind(0, group_id); @@ -782,6 +786,10 @@ bool SQLPTRepresentation::GatherApplicationPoliciesSection( const auto& gather_app_id = ((*policies).apps[app_id].is_string()) ? (*policies).apps[app_id].get_string() : app_id; + + if (!query.IsNull(12)) { + *params.encryption_required = query.GetBoolean(12); + } // Data should be gathered from db by "default" key if application has // default policies @@ -900,7 +908,9 @@ bool SQLPTRepresentation::SaveFunctionalGroupings( groups_it->second.user_consent_prompt.is_initialized() ? query.Bind(2, *(groups_it->second.user_consent_prompt)) : query.Bind(2); - + it->second.encryption_required.is_initialized() + ? query.Bind(3, *(it->second.encryption_required)) + : query.Bind(3); if (!query.Exec() || !query.Reset()) { LOG4CXX_WARN(logger_, "Incorrect insert into functional groups"); return false; @@ -1097,6 +1107,10 @@ bool SQLPTRepresentation::SaveSpecificAppPolicy( ? app_query.Bind(12, *app.second.allow_unknown_rpc_passthrough) : app_query.Bind(12); + app.second.encryption_required.is_initialized() + ? app_query.Bind(13, *app.second.encryption_required) + : app_query.Bind(13); + if (!app_query.Exec() || !app_query.Reset()) { LOG4CXX_WARN(logger_, "Incorrect insert into application."); return false; |