在/opt/gitlab/embedded/service/gitlab-rails/app/views/projects/blob/_actions.html.haml文件中的第二行, edit_blob_link()这个函数,就是用来判断是否有权限进行编辑的。html
找到这个函数的位置,在 /opt/gitlab/embedded/service/gitlab-rails/app/helpers/blob_helper.rb中第23行中的那个函数,里面的38行,就是进行文件的编辑,咱们把39行改为content_tag :span, text, class: cls + ' disabled',也就是第42行。就能够,而后把40行删掉。git