Commit 1ec51361 authored by Takuya Noguchi's avatar Takuya Noguchi

Hide description about protected branches to non-member

parent 3453bc32
......@@ -4,9 +4,10 @@
%div{ class: container_class }
.top-area.adjust
.nav-text
Protected branches can be managed in
= link_to 'project settings', project_protected_branches_path(@project)
- if can?(current_user, :admin_project, @project)
.nav-text
Protected branches can be managed in
= link_to 'project settings', project_protected_branches_path(@project)
.nav-controls
= form_tag(filter_branches_path, method: :get) do
......
---
title: Hide description about protected branches to non-member
merge_request: 12945
author: Takuya Noguchi
......@@ -24,7 +24,6 @@ describe 'Branches', feature: true do
repository.branches_sorted_by(:name).first(20).each do |branch|
expect(page).to have_content("#{branch.name}")
end
expect(page).to have_content("Protected branches can be managed in project settings")
end
it 'sorts the branches by name' do
......@@ -130,6 +129,14 @@ describe 'Branches', feature: true do
project.team << [user, :master]
end
describe 'Initial branches page' do
it 'shows description for admin' do
visit project_branches_path(project)
expect(page).to have_content("Protected branches can be managed in project settings")
end
end
describe 'Delete protected branch' do
before do
visit project_protected_branches_path(project)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment