Improve security policy comparison before persisting
What does this MR do and why?
This MR updates the comparison logic of security policy persistence to fix policy_scope field when it is only updated. Since we are comparing the stringified keys with symbol keys, policy_scope is considered to be updated even if it is not updated.
This MR also adds an additional improvement to return early when the a disabled policy is created to avoid additional queries.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Sashi Kumar Kumaresan