From 8ee1927db90d43205b4e6f8bd13f209c74b41bd1 Mon Sep 17 00:00:00 2001 From: Pavel Shutsin Date: Mon, 18 Mar 2019 17:36:34 +0300 Subject: Move out link\unlink ability checks to a policy We can extend the policy in EE for additional behavior --- app/controllers/profiles/accounts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/profiles') 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" -- cgit v1.2.3