[PR #4522] [MERGED] Fix out-of-transaction query in removeOrgUser (#4521) #17408

Closed
opened 2025-11-02 13:12:23 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/4522
Author: @SagePtr
Created: 7/26/2018
Status: Merged
Merged: 7/26/2018
Merged by: @lafriks

Base: masterHead: master


📝 Commits (1)

  • 6b91555 Fix out-of-transaction query in removeOrgUser (#4521)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 models/org.go (+1 -1)

📄 Description

Fix #4521

This query checked if user is member of organization to prevent deletion twice, but it was done out of transaction, so if user was deleted inside transaction, changes were not visible before commit and user was deleted multiple times (made member counter decrease twice).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/4522 **Author:** [@SagePtr](https://github.com/SagePtr) **Created:** 7/26/2018 **Status:** ✅ Merged **Merged:** 7/26/2018 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`6b91555`](https://github.com/go-gitea/gitea/commit/6b915551f0a62b410988b326c9078fb69ba01051) Fix out-of-transaction query in removeOrgUser (#4521) ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `models/org.go` (+1 -1) </details> ### 📄 Description Fix #4521 This query checked if user is member of organization to prevent deletion twice, but it was done out of transaction, so if user was deleted inside transaction, changes were not visible before commit and user was deleted multiple times (made member counter decrease twice). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 13:12:24 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17408