fixes #2876: Changing approver/contributor privileges should log mod action

This commit is contained in:
r888888888
2017-02-14 12:46:54 -08:00
parent ed8a8001f4
commit aa41c41572
3 changed files with 15 additions and 7 deletions

View File

@@ -9,11 +9,8 @@ module Admin
def update
@user = User.find(params[:id])
@user.promote_to!(
params[:user][:level],
:can_approve_posts => params[:user][:can_approve_posts],
:can_upload_free => params[:user][:can_upload_free]
)
promotion = UserPromotion.new(@user, CurrentUser.user, params[:user][:level], params[:user])
promotion.promote!
redirect_to edit_admin_user_path(@user), :notice => "User updated"
end
end