The Wayback Machine - https://web.archive.org/web/20220416094657/https://github.com/go-gitea/gitea/pull/18786
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ldap user sync missed email in email_address table #18786

Merged
merged 5 commits into from Feb 24, 2022

Conversation

Copy link
Member

@lunny lunny commented Feb 16, 2022

Fix #18603 . Should we keep the old email address or delete it when sync user with new email from ldap?

@lafriks
Copy link
Member

@lafriks lafriks commented Feb 16, 2022

If old email address source is LDAP, it should be deleted

@zeripath
Copy link
Contributor

@zeripath zeripath commented Feb 16, 2022

CI failure is related

@lunny
Copy link
Member Author

@lunny lunny commented Feb 17, 2022

Details

We don't know that. LDAP user could add a new email address and change the primary email. So let it be and user could delete the old email manually.

@codecov-commenter
Copy link

@codecov-commenter codecov-commenter commented Feb 17, 2022

Codecov Report

No coverage uploaded for pull request base (main@cb41f5c). Click here to learn what that means.
The diff coverage is 34.61%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #18786   +/-   ##
=======================================
  Coverage        ?   46.61%           
=======================================
  Files           ?      853           
  Lines           ?   122512           
  Branches        ?        0           
=======================================
  Hits            ?    57111           
  Misses          ?    58507           
  Partials        ?     6894           
Impacted Files Coverage Δ
services/auth/source/ldap/source_sync.go 37.17% <0.00%> (ø)
models/user/user.go 57.97% <37.50%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb41f5c...642fc31. Read the comment docs.

@lunny lunny merged commit f1b1472 into go-gitea:main Feb 24, 2022
2 checks passed
@lunny lunny deleted the lunny/fix_ldap_emails branch Feb 24, 2022
lunny added a commit to lunny/gitea that referenced this issue Feb 24, 2022
* Fix ldap user sync missed email in email_address table

* Fix test
zjjhot added a commit to zjjhot/gitea that referenced this issue Feb 24, 2022
* giteaofficial/main:
  Fix ldap user sync missed email in email_address table (go-gitea#18786)
  Update assignees check to include any writing team and change org sidebar (go-gitea#18680)
  Set max text height to prevent overflow (go-gitea#18862)
  Lock gofumpt to v0.3.0 and run it (go-gitea#18866)
IsActivated: true,
IsPrimary: true,
})
return err
Copy link
Contributor

@zeripath zeripath Feb 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be if err != nil {

Copy link
Member Author

@lunny lunny Feb 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@lunny lunny mentioned this pull request Feb 24, 2022
lunny added a commit to lunny/gitea that referenced this issue Feb 24, 2022
* Fix ldap user sync missed email in email_address table

* Fix test
6543 pushed a commit that referenced this issue Feb 24, 2022
* Fix ldap user sync missed email in email_address table (#18786)
zjjhot added a commit to zjjhot/gitea that referenced this issue Feb 25, 2022
…se/v1.16

* giteaofficial/release/v1.16:
  BeforeSourcePath should point to base commit (go-gitea#18880)
  Add changelog for v1.16.2 (go-gitea#18840)
  Fix ldap user sync missed email in email_address table (go-gitea#18786) (go-gitea#18876)
  Don't report signal: killed errors in serviceRPC (go-gitea#18850) (go-gitea#18865)
  Update assignees check to include any writing team and change org sidebar (go-gitea#18680) (go-gitea#18873)
  Fix login with email for ldap users (go-gitea#18800) (go-gitea#18836)
  Fix ldap edit bug (go-gitea#18859)
  Fix ldap loginname (go-gitea#18789) (go-gitea#18804)
silverwind added a commit to silverwind/gitea that referenced this issue Feb 26, 2022
* Fix ldap user sync missed email in email_address table

* Fix test
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
* Fix ldap user sync missed email in email_address table

* Fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants