Expose "canPushCode" to GraphQL RepositoryBlob Query
This attribute is required for the Replace Modal in the Blob Header.
Replace button | Modal |
---|---|
In this MR > !62880 (merged), we implemented the "Replace" feature into Vue from HAML. During the migration, we noticed the original HAML file was using can_push_code. Unfortunately this attribute was not available in the GraphQL query. So the next best thing was used canModifyBlob
. However, these 2 attributes are NOT exactly the same, see !62880 (comment 600893034). So in this issue, let's expose this attribute and make it available in the GraphQL query for the "RepositoryBlob"
Proposal
backend
1.Please make "canPushCode" attribute available in the GraphQL query for the "RepositoryBlob"
frontend
2.Let's update it to use the updated canPushCode
> https://gitlab.com/gitlab-org/gitlab/blob/f779a43b65b46cac74fddc937088f7e72704f5ee/app/assets/javascripts/repository/components/blob_content_viewer.vue#L140