Fixed policy for controller admin/update
This commit is contained in:
@@ -24,7 +24,7 @@ class Admin::UsersController < ApplicationController
|
||||
end
|
||||
|
||||
def update
|
||||
authorize! @user
|
||||
authorize! @user, to: :change_role?
|
||||
if @user.update(user_params)
|
||||
respond_to do |format|
|
||||
format.html { redirect_back(fallback_location: admin_users_path) }
|
||||
|
||||
Reference in New Issue
Block a user