GitLab steht aufgrund wichtiger Wartungsarbeiten am Montag, den 8. März, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

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,9 +7,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 @@ def set_protected_branch_name(branch_name)
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 @@ def set_protected_branch_name(branch_name)
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