summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorGabriel Mazetto <gabriel@gitlab.com>2016-01-06 05:38:52 -0200
committerGabriel Mazetto <gabriel@gitlab.com>2016-01-08 16:26:04 -0200
commitec67e9be1d7486199b47e19c766202a8bfdefe93 (patch)
tree2499ddcd631bb0935b77d510a6a137ba4b2b1ac4 /app/controllers
parentd6dc088affeee4568e771e1d7894e0bcdb955af8 (diff)
downloadgitlab-ce-ec67e9be1d7486199b47e19c766202a8bfdefe93.tar.gz
Repair ldap_blocked state when no ldap identity exist anymore
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/identities_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/admin/identities_controller.rb b/app/controllers/admin/identities_controller.rb
index e383fe38ea6..9ba10487512 100644
--- a/app/controllers/admin/identities_controller.rb
+++ b/app/controllers/admin/identities_controller.rb
@@ -26,6 +26,7 @@ class Admin::IdentitiesController < Admin::ApplicationController
def update
if @identity.update_attributes(identity_params)
+ RepairLdapBlockedUserService.new(@user, @identity).execute
redirect_to admin_user_identities_path(@user), notice: 'User identity was successfully updated.'
else
render :edit
@@ -34,6 +35,7 @@ class Admin::IdentitiesController < Admin::ApplicationController
def destroy
if @identity.destroy
+ RepairLdapBlockedUserService.new(@user, @identity).execute
redirect_to admin_user_identities_path(@user), notice: 'User identity was successfully removed.'
else
redirect_to admin_user_identities_path(@user), alert: 'Failed to remove user identity.'