Skip to content

Follow-up refactoring for `approve_deployment` in DeploymentPolicy

What does this MR do and why?

This is a follow-up MR after Introduce `approve_deployment` permission (!105985 - merged):

  • Reorder the condition checks in Deployments::ApprovalService#validate to check from cheap to heavy process.
  • Use approve_deployment permission check in Deployments::ApprovalService for DRYing up.
  • Adjusting the error messages accordingly.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Shinya Maeda

Merge request reports