Skip to content

Return 404 if deploy key cannot be found in Projects::DeployKeysController#disable

username-removed-378947 requested to merge deploy-key-disable-missing into master

What does this MR do?

If a deploy key cannot be found, return 404 instead of calling destroy on nil.

Are there points in the code the reviewer needs to double check?

I don't think that this path needs test. However, Projects::DeployKeysController#disable was not covered by any tests so I added a test for the happy path.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #29633 (closed)

Merge request reports