add authorize user
This commit is contained in:
@@ -75,6 +75,8 @@ class UsersController < ApplicationController
|
|||||||
authorize!(:manage, account)
|
authorize!(:manage, account)
|
||||||
|
|
||||||
@user.account = account
|
@user.account = account
|
||||||
|
|
||||||
|
authorize!(:create, @user)
|
||||||
end
|
end
|
||||||
|
|
||||||
if @user.update(attrs.except(*(current_user == @user ? %i[password otp_required_for_login role] : %i[password])))
|
if @user.update(attrs.except(*(current_user == @user ? %i[password otp_required_for_login role] : %i[password])))
|
||||||
|
|||||||
Reference in New Issue
Block a user