Field changes in hit path
This commit is contained in:
@@ -1398,7 +1398,7 @@ int http_hit_policy_list(struct verify_policy_query *verify_policy, size_t hit_c
|
||||
cJSON *hit_obj=NULL, *policy_obj=NULL;
|
||||
cJSON *topObjectList=NULL, *topObject=NULL;
|
||||
hit_obj=cJSON_CreateArray();
|
||||
cJSON_AddItemToObject(data_obj, "hit_policy_list", hit_obj);
|
||||
cJSON_AddItemToObject(data_obj, "hit_rules", hit_obj);
|
||||
if (ctx->hit_cnt >= 1)
|
||||
{
|
||||
for (i = 0; i < ctx->hit_cnt; i++)
|
||||
@@ -1419,13 +1419,13 @@ int http_hit_policy_list(struct verify_policy_query *verify_policy, size_t hit_c
|
||||
{
|
||||
if(uuid_compare(ctx->enforce_rules[rules].rule_uuid, ctx->hit_rules[i].rule_uuid) == 0)
|
||||
{
|
||||
cJSON_AddBoolToObject(policy_obj, "is_execute_policy", true);
|
||||
cJSON_AddBoolToObject(policy_obj, "is_execute", true);
|
||||
succeeded = true;
|
||||
}
|
||||
}
|
||||
if (succeeded == false)
|
||||
{
|
||||
cJSON_AddBoolToObject(policy_obj, "is_execute_policy", false);
|
||||
cJSON_AddBoolToObject(policy_obj, "is_execute", false);
|
||||
}
|
||||
cJSON_AddItemToArray(hit_obj, policy_obj);
|
||||
uuid_copy(result_rule_uuid[i], ctx->hit_rules[i].rule_uuid);
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
"code": 200,
|
||||
"msg": "Success",
|
||||
"data": {
|
||||
"hit_policy_list": [
|
||||
"hit_rules": [
|
||||
{
|
||||
"uuid": "00001021-0000-0000-0000-000000000000",
|
||||
"policyName": "",
|
||||
"is_execute_policy": true,
|
||||
"is_execute": true,
|
||||
"top_object_list": [
|
||||
{
|
||||
"object_uuid": "00005000-0000-0000-0000-000000000000",
|
||||
@@ -47,11 +47,11 @@
|
||||
"code": 200,
|
||||
"msg": "Success",
|
||||
"data": {
|
||||
"hit_policy_list": [
|
||||
"hit_rules": [
|
||||
{
|
||||
"uuid": "00001022-0000-0000-0000-000000000000",
|
||||
"policyName": "",
|
||||
"is_execute_policy": true,
|
||||
"is_execute": true,
|
||||
"top_object_list": [
|
||||
{
|
||||
"tag_uuid": "00000011-0000-0000-0000-000000000000",
|
||||
@@ -199,11 +199,11 @@
|
||||
"code": 200,
|
||||
"msg": "Success",
|
||||
"data": {
|
||||
"hit_policy_list": [
|
||||
"hit_rules": [
|
||||
{
|
||||
"uuid": "00001024-0000-0000-0000-000000000000",
|
||||
"policyName": "",
|
||||
"is_execute_policy": true,
|
||||
"is_execute": true,
|
||||
"top_object_list": [
|
||||
{
|
||||
"object_uuid": "00005001-0000-0000-0000-000000000000",
|
||||
@@ -234,7 +234,7 @@
|
||||
{
|
||||
"uuid": "00001023-0000-0000-0000-000000000000",
|
||||
"policyName": "",
|
||||
"is_execute_policy": false,
|
||||
"is_execute": false,
|
||||
"top_object_list": [
|
||||
{
|
||||
"object_uuid": "00005001-0000-0000-0000-000000000000",
|
||||
@@ -355,11 +355,11 @@
|
||||
"code": 200,
|
||||
"msg": "Success",
|
||||
"data": {
|
||||
"hit_policy_list": [
|
||||
"hit_rules": [
|
||||
{
|
||||
"uuid": "00001026-0000-0000-0000-000000000000",
|
||||
"policyName": "",
|
||||
"is_execute_policy": true,
|
||||
"is_execute": true,
|
||||
"top_object_list": [
|
||||
{
|
||||
"object_uuid": "00003022-0000-0000-0000-000000000000",
|
||||
@@ -372,7 +372,7 @@
|
||||
{
|
||||
"uuid": "00001025-0000-0000-0000-000000000000",
|
||||
"policyName": "",
|
||||
"is_execute_policy": true,
|
||||
"is_execute": true,
|
||||
"top_object_list": [
|
||||
{
|
||||
"object_uuid": "00003023-0000-0000-0000-000000000000",
|
||||
@@ -438,11 +438,11 @@
|
||||
"code": 200,
|
||||
"msg": "Success",
|
||||
"data": {
|
||||
"hit_policy_list": [
|
||||
"hit_rules": [
|
||||
{
|
||||
"uuid": "00001027-0000-0000-0000-000000000000",
|
||||
"policyName": "",
|
||||
"is_execute_policy": true,
|
||||
"is_execute": true,
|
||||
"top_object_list": [
|
||||
{
|
||||
"object_uuid": "00003022-0000-0000-0000-000000000000",
|
||||
@@ -493,11 +493,11 @@
|
||||
"code": 200,
|
||||
"msg": "Success",
|
||||
"data": {
|
||||
"hit_policy_list": [
|
||||
"hit_rules": [
|
||||
{
|
||||
"uuid": "00600010-0000-0000-0000-000000000000",
|
||||
"policyName": "",
|
||||
"is_execute_policy": true,
|
||||
"is_execute": true,
|
||||
"top_object_list": [
|
||||
{
|
||||
"object_uuid": "00500100-0000-0000-0000-000000000000",
|
||||
@@ -670,11 +670,11 @@
|
||||
"code": 200,
|
||||
"msg": "Success",
|
||||
"data": {
|
||||
"hit_policy_list": [
|
||||
"hit_rules": [
|
||||
{
|
||||
"uuid": "00002020-0000-0000-0000-000000000000",
|
||||
"policyName": "",
|
||||
"is_execute_policy": true,
|
||||
"is_execute": true,
|
||||
"top_object_list": [
|
||||
{
|
||||
"object_uuid": "00008000-0000-0000-0000-000000000000",
|
||||
|
||||
Reference in New Issue
Block a user