Commit ad56ae0d authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '35253-desc-protected-branches-for-non-member' into 'master'

Hide description about protected branches to non-member

Closes #35253

See merge request !12945
parents 1540cc43 1ec51361
......@@ -7,6 +7,7 @@
%div{ class: container_class }
.top-area.adjust
- if can?(current_user, :admin_project, @project)
.nav-text
Protected branches can be managed in
= link_to 'project settings', project_protected_branches_path(@project)
......
---
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