Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix bug when updating user email#36058

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lunny merged 2 commits intogo-gitea:mainfromlunny:lunny/fix_admin_edit_user_email
Dec 1, 2025

Conversation

@lunny
Copy link
Member

@lunnylunny commentedNov 29, 2025
edited
Loading

Fix#20390

We should useReplacePrimaryEmailAddress instead ofAdminAddOrSetPrimaryEmailAddress when modify user's email from admin panel. And also we need a database transaction to keep deletion and insertion succeed at the same time.

@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelNov 29, 2025
@github-actionsgithub-actionsbot added the modifies/goPull requests that update Go code labelNov 29, 2025
@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelsDec 1, 2025
@GiteaBotGiteaBot added lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1This PR needs approval from one additional maintainer to be merged. labelsDec 1, 2025
@lunnylunny added the reviewed/wait-mergeThis pull request is part of the merge queue. It will be merged soon. labelDec 1, 2025
@lunnylunnyenabled auto-merge (squash)December 1, 2025 23:25
@lunnylunny merged commit5340db4 intogo-gitea:mainDec 1, 2025
23 checks passed
@GiteaBotGiteaBot added this to the1.26.0 milestoneDec 1, 2025
@GiteaBotGiteaBot removed the reviewed/wait-mergeThis pull request is part of the merge queue. It will be merged soon. labelDec 1, 2025
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull requestDec 2, 2025
Fixgo-gitea#20390 We should use `ReplacePrimaryEmailAddress` instead of`AdminAddOrSetPrimaryEmailAddress` when modify user's email from adminpanel. And also we need a database transaction to keep deletion andinsertion succeed at the same time.
@GiteaBotGiteaBot added the backport/doneAll backports for this PR have been created labelDec 2, 2025
silverwind pushed a commit that referenced this pull requestDec 2, 2025
Backport#36058 by@lunnyFix#20390 We should use `ReplacePrimaryEmailAddress` instead of`AdminAddOrSetPrimaryEmailAddress` when modify user's email from adminpanel. And also we need a database transaction to keep deletion andinsertion succeed at the same time.Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@wxiaoguangwxiaoguang deleted the lunny/fix_admin_edit_user_email branchDecember 2, 2025 03:21
@wxiaoguang
Copy link
Contributor

wxiaoguang commentedDec 2, 2025
edited
Loading

I have some questions about this change:

  1. AdminAddOrSetPrimaryEmailAddress is still called by API's "EditUser"PATCH /admin/users/{username}
    • Why the API doesn't get the fix?
  2. What's wrong with "AdminAddOrSetPrimaryEmailAddress"?
    • If it is not fixable, you need to remove it.
    • If it is fixable, you need to fix it and add tests.

zjjhot added a commit to zjjhot/gitea that referenced this pull requestDec 2, 2025
* giteaofficial/main:  [skip ci] Updated translations via Crowdin  Fix bug when updating user email (go-gitea#36058)  Add "Go to file", "Delete Directory" to repo file list page (go-gitea#35911)  Replace `lint-go-gopls` with additional `govet` linters (go-gitea#36028)  Fix Actions `pull_request.paths` being triggered incorrectly by rebase (go-gitea#36045)
silverwind added a commit to silverwind/gitea that referenced this pull requestDec 2, 2025
* origin/main:  [skip ci] Updated translations via Crowdin  Fix bug when updating user email (go-gitea#36058)  Add "Go to file", "Delete Directory" to repo file list page (go-gitea#35911)  Replace `lint-go-gopls` with additional `govet` linters (go-gitea#36028)  Fix Actions `pull_request.paths` being triggered incorrectly by rebase (go-gitea#36045)  Fix error handling in mailer and wiki services (go-gitea#36041)  Update JS deps, fix deprecations (go-gitea#36040)  Fix incorrect viewed files counter if file has changed (go-gitea#36009)
silverwind pushed a commit that referenced this pull requestDec 4, 2025
Follow#36058 for API edit user bug when editing email.- The Admin Edit User API includes a breaking change. Previously, whenupdating a user with an email from an unallowed domain, the requestwould succeed but return a warning in the response headers. Now, therequest will fail and return an error in the response body instead.- Removed `AdminAddOrSetPrimaryEmailAddress` because it will not be usedany where.Fix#36058 (comment)---------Co-authored-by: Giteabot <teabot@gitea.io>
GiteaBot added a commit to GiteaBot/gitea that referenced this pull requestDec 4, 2025
Followgo-gitea#36058 for API edit user bug when editing email.- The Admin Edit User API includes a breaking change. Previously, whenupdating a user with an email from an unallowed domain, the requestwould succeed but return a warning in the response headers. Now, therequest will fail and return an error in the response body instead.- Removed `AdminAddOrSetPrimaryEmailAddress` because it will not be usedany where.Fixgo-gitea#36058 (comment)---------Co-authored-by: Giteabot <teabot@gitea.io>
silverwind pushed a commit that referenced this pull requestDec 4, 2025
Backport#36068 by@lunnyFollow#36058 for API edit user bug when editing email.- The Admin Edit User API includes a breaking change. Previously, whenupdating a user with an email from an unallowed domain, the requestwould succeed but return a warning in the response headers. Now, therequest will fail and return an error in the response body instead.- Removed `AdminAddOrSetPrimaryEmailAddress` because it will not be usedany where.Fix#36058 (comment)Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@xnoxxnox mentioned this pull requestDec 7, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@silverwindsilverwindsilverwind approved these changes

@lafrikslafrikslafriks approved these changes

Assignees

No one assigned

Labels

backport/doneAll backports for this PR have been createdbackport/v1.25lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore.modifies/goPull requests that update Go codetype/bug

Projects

None yet

Milestone

1.26.0

Development

Successfully merging this pull request may close these issues.

The user's home page pointed to in the commit message is wrong

5 participants

@lunny@wxiaoguang@silverwind@lafriks@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp