Skip to content

Follow up: Restrict access to retry button

Follow up form this comment: &8516 (comment 1246641791)

I think that we should probably restrict the button to only be shown to project members.

Proposal

Restrict access to the Retry button (Retry button if there are failed status checks (#383200 - closed)) to project developer/maintainer and above

Implementation plan

  1. expose a new property can_retry_external_status_checks from the backend, e.g. in current_user here
  2. populate this property based on the current users role in the current merge_request.project
  3. pass the value to the Vue component via the mr_widget_store.js
  4. conditionally hide the retry button by only adding an action to the row if the new property is true
Edited by Elwyn Benson