add authorize user

pull/714/head
Pete Matsyburka 1 month ago
parent c59c470321
commit ffb3247cdc

@ -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])))

Loading…
Cancel
Save