diff options
author | Azul <azul@riseup.net> | 2016-07-05 08:54:43 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-07-05 08:54:43 +0200 |
commit | 798c1240b59403b8d8de9559776718266b2ecba5 (patch) | |
tree | 74b53a8762710a76c4ca5d270b6ef9545dfca221 /app/controllers/api/users_controller.rb | |
parent | fcc8207f84249612eba719b8aa77cd7c51e5ad5a (diff) | |
parent | 30da8e6ffa1eefafb9762645efb85e0beed236c6 (diff) |
Merge remote-tracking branch 'pr/222' into merge-branch
Diffstat (limited to 'app/controllers/api/users_controller.rb')
-rw-r--r-- | app/controllers/api/users_controller.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/api/users_controller.rb b/app/controllers/api/users_controller.rb index e64d21f..c79a729 100644 --- a/app/controllers/api/users_controller.rb +++ b/app/controllers/api/users_controller.rb @@ -50,8 +50,7 @@ module Api end def destroy - destroy_identity = current_user.is_monitor? || params[:identities] == "destroy" - @user.account.destroy(destroy_identity) + @user.account.destroy(release_handles) if @user == current_user logout end @@ -60,6 +59,10 @@ module Api private + def release_handles + current_user.is_monitor? || params[:identities] == "destroy" + end + # tester auth can only create test users. def create_test_account if User::is_test?(params[:user][:login]) |