Add ip_address, email, and context to staff_action_logs table. Context should usually be the url from which the staff member performed the action, but could be any string that describes what the staff member was doing when the action was performed.

This commit is contained in:
Neil Lalonde
2013-07-25 18:04:51 -04:00
parent 5f3e9131ed
commit e076158789
6 changed files with 20 additions and 6 deletions

View File

@ -118,7 +118,7 @@ class Admin::UsersController < Admin::AdminController
user = User.where(id: params[:id]).first
guardian.ensure_can_delete_user!(user)
begin
if UserDestroyer.new(current_user).destroy(user, params.slice(:delete_posts, :block_email))
if UserDestroyer.new(current_user).destroy(user, params.slice(:delete_posts, :block_email, :context))
render json: {deleted: true}
else
render json: {deleted: false, user: AdminDetailedUserSerializer.new(user, root: false).as_json}