diff options
Diffstat (limited to 'src/components/policy/policy_external/src/sql_pt_ext_representation.cc')
-rw-r--r-- | src/components/policy/policy_external/src/sql_pt_ext_representation.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/components/policy/policy_external/src/sql_pt_ext_representation.cc b/src/components/policy/policy_external/src/sql_pt_ext_representation.cc index c0214f087f..29970a4424 100644 --- a/src/components/policy/policy_external/src/sql_pt_ext_representation.cc +++ b/src/components/policy/policy_external/src/sql_pt_ext_representation.cc @@ -675,6 +675,21 @@ bool SQLPTExtRepresentation::SaveApplicationPoliciesSection( return false; } + if (!query_delete.Exec(sql_pt::kDeleteAppServiceHandledRpcs)) { + LOG4CXX_WARN(logger_, "Incorrect delete from handled rpcs."); + return false; + } + + if (!query_delete.Exec(sql_pt::kDeleteAppServiceNames)) { + LOG4CXX_WARN(logger_, "Incorrect delete from service names."); + return false; + } + + if (!query_delete.Exec(sql_pt::kDeleteAppServiceTypes)) { + LOG4CXX_WARN(logger_, "Incorrect delete from handled service types."); + return false; + } + // First, all predefined apps (e.g. default, pre_DataConsent) should be saved, // otherwise another app with the predefined permissions can get incorrect // permissions @@ -729,6 +744,10 @@ bool SQLPTExtRepresentation::SaveSpecificAppPolicy( if (!SaveRequestSubType(app.first, *app.second.RequestSubType)) { return false; } + if (!SaveAppServiceParameters(app.first, + *app.second.app_service_parameters)) { + return false; + } // Stop saving other params, since predefined permissions already set return true; } @@ -808,6 +827,11 @@ bool SQLPTExtRepresentation::SaveSpecificAppPolicy( return false; } + if (!SaveAppServiceParameters(app.first, + *app.second.app_service_parameters)) { + return false; + } + return true; } @@ -945,6 +969,10 @@ bool SQLPTExtRepresentation::GatherApplicationPoliciesSection( if (!GatherRequestSubType(gather_app_id, &*params.RequestSubType)) { return false; } + if (!GatherAppServiceParameters(gather_app_id, + &*params.app_service_parameters)) { + return false; + } GatherPreconsentedGroup(gather_app_id, &*params.preconsented_groups); (*policies).apps[app_id] = params; } |