feat: add fields to syncer (PreferredMfaType, TotpSecret, SignupApplication) #2239 (#2245)

This commit is contained in:
Andrey 2023-08-23 17:40:00 +04:00 committed by GitHub
parent 4d8edcc446
commit a0c5eb241f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -160,6 +160,12 @@ func (syncer *Syncer) setUserByKeyValue(user *User, key string, value string) {
user.IsDeleted = util.ParseBool(value) user.IsDeleted = util.ParseBool(value)
case "CreatedIp": case "CreatedIp":
user.CreatedIp = value user.CreatedIp = value
case "PreferredMfaType":
user.PreferredMfaType = value
case "TotpSecret":
user.TotpSecret = value
case "SignupApplication":
user.SignupApplication = value
} }
} }
@ -290,6 +296,9 @@ func (syncer *Syncer) getMapFromOriginalUser(user *OriginalUser) map[string]stri
m["IsForbidden"] = util.BoolToString(user.IsForbidden) m["IsForbidden"] = util.BoolToString(user.IsForbidden)
m["IsDeleted"] = util.BoolToString(user.IsDeleted) m["IsDeleted"] = util.BoolToString(user.IsDeleted)
m["CreatedIp"] = user.CreatedIp m["CreatedIp"] = user.CreatedIp
m["PreferredMfaType"] = user.PreferredMfaType
m["TotpSecret"] = user.TotpSecret
m["SignupApplication"] = user.SignupApplication
m2 := map[string]string{} m2 := map[string]string{}
for _, tableColumn := range syncer.TableColumns { for _, tableColumn := range syncer.TableColumns {

View File

@ -100,7 +100,8 @@ class SyncerTableColumnTable extends React.Component {
{ {
["Name", "CreatedTime", "UpdatedTime", "Id", "Type", "Password", "PasswordSalt", "DisplayName", "FirstName", "LastName", "Avatar", "PermanentAvatar", ["Name", "CreatedTime", "UpdatedTime", "Id", "Type", "Password", "PasswordSalt", "DisplayName", "FirstName", "LastName", "Avatar", "PermanentAvatar",
"Email", "EmailVerified", "Phone", "Location", "Address", "Affiliation", "Title", "IdCardType", "IdCard", "Homepage", "Bio", "Tag", "Region", "Email", "EmailVerified", "Phone", "Location", "Address", "Affiliation", "Title", "IdCardType", "IdCard", "Homepage", "Bio", "Tag", "Region",
"Language", "Gender", "Birthday", "Education", "Score", "Ranking", "IsDefaultAvatar", "IsOnline", "IsAdmin", "IsForbidden", "IsDeleted", "CreatedIp"] "Language", "Gender", "Birthday", "Education", "Score", "Ranking", "IsDefaultAvatar", "IsOnline", "IsAdmin", "IsForbidden", "IsDeleted", "CreatedIp",
"PreferredMfaType", "TotpSecret", "SignupApplication"]
.map((item, index) => <Option key={index} value={item}>{item}</Option>) .map((item, index) => <Option key={index} value={item}>{item}</Option>)
} }
</Select> </Select>