fix: make "login_name" field optional for API edit user (#38917)

This commit is contained in:
wxiaoguang
2026-08-16 21:39:28 +08:00
committed by GitHub
parent 5e4d21acd5
commit 63f2918336
6 changed files with 9 additions and 43 deletions
+1 -4
View File
@@ -11,7 +11,6 @@ type CreateUserOption struct {
// The authentication source ID to associate with the user
SourceID int64 `json:"source_id"`
// identifier of the user, provided by the external authenticator (if configured)
// default: empty
LoginName string `json:"login_name"`
// username of the user
// required: true
@@ -43,9 +42,7 @@ type EditUserOption struct {
// The authentication source ID to associate with the user
SourceID int64 `json:"source_id"`
// identifier of the user, provided by the external authenticator (if configured)
// default: empty
// required: true
LoginName string `json:"login_name" binding:"Required"`
LoginName *string `json:"login_name"`
// swagger:strfmt email
// The email address of the user
Email *string `json:"email" binding:"MaxSize(254)"`