Browse Source

Confirm user update / deletion (#37674).

Patch by Jens Krämer.


git-svn-id: https://svn.redmine.org/redmine/trunk@21825 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/5.1.0
Go MAEDA 1 year ago
parent
commit
eb9bd3e836
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      app/controllers/users_controller.rb

+ 2
- 0
app/controllers/users_controller.rb View File

@@ -205,8 +205,10 @@ class UsersController < ApplicationController
if api_request? || params[:lock] || params[:confirm] == @user.login
if params[:lock]
@user.update_attribute :status, User::STATUS_LOCKED
flash[:notice] = l(:notice_successful_update)
else
@user.destroy
flash[:notice] = l(:notice_successful_delete)
end
respond_to do |format|
format.html {redirect_back_or_default(users_path)}

Loading…
Cancel
Save