Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Shutsin <pshutsin@gitlab.com>2019-03-18 17:36:34 +0300
committerPavel Shutsin <pshutsin@gitlab.com>2019-03-19 15:38:16 +0300
commit8ee1927db90d43205b4e6f8bd13f209c74b41bd1 (patch)
tree247e5f813947c1bdeb838e2776835208e6a7e2bc /app/controllers/profiles
parenta4b18040778d7272bd8fbbb3746e199699ffd893 (diff)
Move out link\unlink ability checks to a policy
We can extend the policy in EE for additional behavior
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r--app/controllers/profiles/accounts_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/profiles/accounts_controller.rb b/app/controllers/profiles/accounts_controller.rb
index b0d65f284af..0d2a6145d0e 100644
--- a/app/controllers/profiles/accounts_controller.rb
+++ b/app/controllers/profiles/accounts_controller.rb
@@ -14,7 +14,7 @@ class Profiles::AccountsController < Profiles::ApplicationController
return render_404 unless identity
- if unlink_allowed?(provider)
+ if unlink_provider_allowed?(provider)
identity.destroy
else
flash[:alert] = "You are not allowed to unlink your primary login account"