Skip to content

Commit

Permalink
Allow creating an API level policy while having a common policy with …
Browse files Browse the repository at this point in the history
…same name and version and is attached to the API already
  • Loading branch information
RusJaI committed Dec 20, 2024
1 parent c595c7f commit 0a6e19d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4300,6 +4300,8 @@ public static class OperationPolicyConstants {
" OP.POLICY_UUID = ? AND OP.ORGANIZATION = ?";


// CLONED_POLICY_UUID IS NULL was added to the query to allow creating an API level policy while having a common policy with same name and version
// and is attached to the API already
public static final String GET_API_SPECIFIC_OPERATION_POLICY_FROM_POLICY_NAME =
"SELECT " +
" OP.POLICY_UUID, OP.POLICY_NAME, OP.POLICY_VERSION, OP.DISPLAY_NAME, OP.POLICY_DESCRIPTION, OP.APPLICABLE_FLOWS, OP.GATEWAY_TYPES, OP.API_TYPES, " +
Expand All @@ -4308,7 +4310,7 @@ public static class OperationPolicyConstants {
" FROM " +
" AM_OPERATION_POLICY OP INNER JOIN AM_API_OPERATION_POLICY AOP ON OP.POLICY_UUID = AOP.POLICY_UUID " +
" WHERE " +
" OP.POLICY_NAME = ? AND OP.POLICY_VERSION = ? AND OP.ORGANIZATION = ? AND AOP.API_UUID = ? ";
" OP.POLICY_NAME = ? AND OP.POLICY_VERSION = ? AND OP.ORGANIZATION = ? AND AOP.API_UUID = ? AND AOP.CLONED_POLICY_UUID IS NULL ";

public static final String GET_COMMON_OPERATION_POLICY_FROM_POLICY_NAME =
"SELECT " +
Expand Down

0 comments on commit 0a6e19d

Please sign in to comment.