Skip to content

Fix pipeline header actions from showing when user does not have permission

What does this MR do?

When app/assets/javascripts/pipelines/components/header_component.vue was built permissions were not taken into consideration for the cancel and retry actions. The mutation types have authorization checks on them so if a user does not have the permissions they couldn't retry or cancel a pipeline.

But we still showed the actions in the UI. This MR takes into consideration the updatePipeline permission and ensures a user does not see the actions unless they have permissions.

Related to: #322714 (closed)

Screenshots (strongly suggested)

before after
Screen_Shot_2021-05-19_at_2.49.46_PM Screen_Shot_2021-05-19_at_2.50.11_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #322714 (closed)

Edited by Payton Burdette

Merge request reports

Loading