feat: 用户管理列表增加来源字段(auth_source),支持本地/LDAP筛选

This commit is contained in:
hermes-$(hostname) committed 2026-05-29 17:05:56 +00:00
1 parent ac07e6ef38
commit 8384006ae9
5 files changed
+196 -117

No files matched your search

+1
View File
@@ -16,6 +16,7 @@ type User struct {
Email *string `gorm:"size:100" json:"email"`
Phone *string `gorm:"size:20" json:"phone"`
HashedPassword string `gorm:"size:200;not null" json:"-"`
AuthSource string `gorm:"size:20;default:'local'" json:"auth_source"` // local / ldap
Role string `gorm:"size:20;not null" json:"role"` // admin, dba, developer, auditor
IsActive *bool `gorm:"default:true" json:"is_active"`
Preferences *string `gorm:"type:text" json:"preferences"` // JSON: {"theme":"dark","login_style":"split"}