GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 963bfe95 authored by Daniel Gerhardt's avatar Daniel Gerhardt

Hide HTTPS clone button for non-public projects for CAS users

Additionally, the prompt to set a password is no longer shown for CAS
users.
parent 198669b4
......@@ -37,7 +37,7 @@ def http_clone_button(project, placement = 'right', append_link: true)
html: true,
placement: placement,
container: 'body',
title: "Set a password on your account<br>to pull or push via #{protocol}"
title: (current_user && current_user.cas_user?) ? "You cannot push via #{gitlab_config.protocol.upcase}" : "Set a password on your account<br>to pull or push via #{protocol}"
}
end
......
......@@ -3,7 +3,7 @@
= content_for :flash_message do
- if current_user && can?(current_user, :download_code, @project)
= render 'shared/no_ssh'
= render 'shared/no_password'
= render 'shared/no_password' unless current_user.cas_user?
= render "home_panel"
......
......@@ -7,7 +7,7 @@
= content_for :flash_message do
- if current_user && can?(current_user, :download_code, @project)
= render 'shared/no_ssh'
= render 'shared/no_password'
= render 'shared/no_password' unless current_user.cas_user?
= render 'projects/last_push'
= render "home_panel"
......
......@@ -2,7 +2,7 @@
.git-clone-holder.input-group
.input-group-btn
-if allowed_protocols_present?
-if allowed_protocols_present? && (project.visibility_level == Gitlab::VisibilityLevel::PUBLIC || (current_user && !current_user.cas_user?))
.clone-dropdown-btn.btn.btn-static
%span
= enabled_project_button(project, enabled_protocol)
......@@ -14,8 +14,9 @@
%ul.dropdown-menu.dropdown-menu-right.clone-options-dropdown
%li
= ssh_clone_button(project)
%li
= http_clone_button(project)
- if project.visibility_level == Gitlab::VisibilityLevel::PUBLIC || (current_user && !current_user.cas_user?)
%li
= http_clone_button(project)
= text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true
.input-group-btn
......
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