summaryrefslogtreecommitdiff
path: root/app/views/profiles
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2017-03-28 11:33:51 +0100
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-03-31 18:42:34 +0100
commitb9adf92f3c96d5f24fa413944dff3b932740a613 (patch)
treeebb38fe8bfadf720dc1fc4948f5f7fde3749ba2c /app/views/profiles
parent19a4403443ff6217e6a024667f8ef1eea2f38f4a (diff)
downloadgitlab-ce-b9adf92f3c96d5f24fa413944dff3b932740a613.tar.gz
Prevent users from disconnecting gitlab account from CAS
Diffstat (limited to 'app/views/profiles')
-rw-r--r--app/views/profiles/accounts/show.html.haml8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml
index 8a994f6d600..5ce2220c907 100644
--- a/app/views/profiles/accounts/show.html.haml
+++ b/app/views/profiles/accounts/show.html.haml
@@ -75,12 +75,12 @@
.provider-btn-image
= provider_image_tag(provider)
- if auth_active?(provider)
- - if provider.to_s == 'saml'
- %a.provider-btn
- Active
- - else
+ - if unlink_allowed?(provider)
= link_to unlink_profile_account_path(provider: provider), method: :delete, class: 'provider-btn' do
Disconnect
+ - else
+ %a.provider-btn
+ Active
- else
= link_to omniauth_authorize_path(:user, provider), method: :post, class: 'provider-btn not-active' do
Connect