Enforce account locks when creating new users (#3173)

Properly enforce account locks when new users are created

---------

Co-authored-by: Caetan Tojeiro Carpente <caetan.tojeiro@tier8.com>
This commit is contained in:
Caetan 2024-09-23 05:53:08 +02:00 committed by GitHub
parent 8e79294413
commit 908886f2cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -109,6 +109,7 @@ func (as *Server) Users(w http.ResponseWriter, r *http.Request) {
Role: role, Role: role,
RoleID: role.ID, RoleID: role.ID,
PasswordChangeRequired: ur.PasswordChangeRequired, PasswordChangeRequired: ur.PasswordChangeRequired,
AccountLocked: ur.AccountLocked,
} }
err = models.PutUser(&user) err = models.PutUser(&user)
if err != nil { if err != nil {