fix: add SignupApplication and type for user synced from LDAP (#2240)

This commit is contained in:
Yaodong Yu
2023-08-21 22:52:35 +08:00
committed by GitHub
parent e60ee52d91
commit 2b23c04f49
2 changed files with 15 additions and 13 deletions

View File

@ -311,18 +311,20 @@ func SyncLdapUsers(owner string, syncUsers []LdapUser, ldapId string) (existUser
}
newUser := &User{
Owner: owner,
Name: name,
CreatedTime: util.GetCurrentTime(),
DisplayName: syncUser.buildLdapDisplayName(),
Avatar: organization.DefaultAvatar,
Email: syncUser.Email,
Phone: syncUser.Mobile,
Address: []string{syncUser.Address},
Affiliation: affiliation,
Tag: tag,
Score: score,
Ldap: syncUser.Uuid,
Owner: owner,
Name: name,
CreatedTime: util.GetCurrentTime(),
DisplayName: syncUser.buildLdapDisplayName(),
SignupApplication: organization.DefaultApplication,
Type: "normal-user",
Avatar: organization.DefaultAvatar,
Email: syncUser.Email,
Phone: syncUser.Mobile,
Address: []string{syncUser.Address},
Affiliation: affiliation,
Tag: tag,
Score: score,
Ldap: syncUser.Uuid,
}
affected, err := AddUser(newUser)

View File

@ -536,7 +536,7 @@ func UpdateUser(id string, user *User, columns []string, isAdmin bool) (bool, er
"auth0", "battlenet", "bitbucket", "box", "cloudfoundry", "dailymotion", "deezer", "digitalocean", "discord", "dropbox",
"eveonline", "fitbit", "gitea", "heroku", "influxcloud", "instagram", "intercom", "kakao", "lastfm", "mailru", "meetup",
"microsoftonline", "naver", "nextcloud", "onedrive", "oura", "patreon", "paypal", "salesforce", "shopify", "soundcloud",
"spotify", "strava", "stripe", "tiktok", "tumblr", "twitch", "twitter", "typetalk", "uber", "vk", "wepay", "xero", "yahoo",
"spotify", "strava", "stripe", "type", "tiktok", "tumblr", "twitch", "twitter", "typetalk", "uber", "vk", "wepay", "xero", "yahoo",
"yammer", "yandex", "zoom", "custom",
}
}