Skip to content

Fix bug with internal project snippets and project maintainer

What does this MR do?

In https://gitlab.com/gitlab-org/gitlab/blob/766d8733675e219fda566156913297ec6bbadcc9/app/policies/project_snippet_policy.rb#L36 we establish that, if the snippet is internal and the user is not the author or an admin, they shouldn't be allowed to delete the snippet.

Nevertheless, this is not right if the user if the project maintainer. In https://gitlab.com/gitlab-org/gitlab/blob/766d8733675e219fda566156913297ec6bbadcc9/app/policies/project_policy.rb#L290 we establish that a maintainer should be able to read, update and delete snippets, and that should be valid inside the project scope.

Closes #207803 (closed)

Does this MR meet the acceptance criteria?

Conformity

Edited by Francisco Javier López

Merge request reports

Loading