add authorize user

This commit is contained in:
Pete Matsyburka committed 2026-08-09 18:37:53 +03:00
1 parent c59c470321
commit ffb3247cdc
1 file changed
+2
+2
View File
@@ -75,6 +75,8 @@ class UsersController < ApplicationController
authorize!(:manage, account)
@user.account = account
authorize!(:create, @user)
end
if @user.update(attrs.except(*(current_user == @user ? %i[password otp_required_for_login role] : %i[password])))