FIX: add context for deactivated user logs
This commit is contained in:
parent
8cf0f51eb2
commit
3a6e137e70
|
@ -300,7 +300,8 @@ const AdminUser = Discourse.User.extend({
|
|||
|
||||
deactivate() {
|
||||
return ajax('/admin/users/' + this.id + '/deactivate', {
|
||||
type: 'PUT'
|
||||
type: 'PUT',
|
||||
data: { context: document.location.pathname }
|
||||
}).then(function() {
|
||||
window.location.reload();
|
||||
}).catch(function(e) {
|
||||
|
|
|
@ -276,7 +276,7 @@ class Admin::UsersController < Admin::AdminController
|
|||
def deactivate
|
||||
guardian.ensure_can_deactivate!(@user)
|
||||
@user.deactivate
|
||||
StaffActionLogger.new(current_user).log_user_deactivate(@user, I18n.t('user.deactivated_by_staff'))
|
||||
StaffActionLogger.new(current_user).log_user_deactivate(@user, I18n.t('user.deactivated_by_staff'), params.slice(:context))
|
||||
refresh_browser @user
|
||||
render body: nil
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue