fix: Admins should not be allowed to add third-party login for their members (#932)

* feat: admin can unlink the other user

* feat: global admin can unlink other user

* fix
This commit is contained in:
q1anx1
2022-07-30 23:11:02 +08:00
committed by GitHub
parent fb9b8f1662
commit 9cb519d1e9
6 changed files with 63 additions and 10 deletions

View File

@ -37,11 +37,11 @@ func TestSyncAvatarsFromGitHub(t *testing.T) {
users := GetGlobalUsers()
for _, user := range users {
if user.Github == "" {
if user.GitHub == "" {
continue
}
user.Avatar = fmt.Sprintf("https://avatars.githubusercontent.com/%s", user.Github)
user.Avatar = fmt.Sprintf("https://avatars.githubusercontent.com/%s", user.GitHub)
updateUserColumn("avatar", user)
}
}