-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Don't return duplicated users who can create org repo #22560
Merged
Merged
Commits on Jan 21, 2023
-
Don't return duplicated users who can create org repo
- Currently the function `GetUsersWhoCanCreateOrgRepo` uses a query that is able to have duplicated users in the result, this is can happen under the condition that a user is in team that either is the owner team or has permission to create organization repositories. - Add test code to simulate the above condition for user 3, [`TestGetUsersWhoCanCreateOrgRepo`](https://github.com/go-gitea/gitea/blob/a1fcb1cfb84fd6b36c8fe9fd56588119fa4377bc/models/organization/org_test.go#L435) is the test function that tests for this. - The fix is quite trivial, which is adding `DISTINCT` keyword to `` `user`.id ``.
Configuration menu - View commit details
-
Copy full SHA for c291563 - Browse repository at this point
Copy the full SHA c291563View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2583096 - Browse repository at this point
Copy the full SHA 2583096View commit details
Commits on Jan 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 95cf48c - Browse repository at this point
Copy the full SHA 95cf48cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 77d56f9 - Browse repository at this point
Copy the full SHA 77d56f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c7dcbe - Browse repository at this point
Copy the full SHA 3c7dcbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c5782e - Browse repository at this point
Copy the full SHA 5c5782eView commit details
Commits on Jan 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1f2cf00 - Browse repository at this point
Copy the full SHA 1f2cf00View commit details
Commits on Jan 29, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 945e27a - Browse repository at this point
Copy the full SHA 945e27aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d496103 - Browse repository at this point
Copy the full SHA d496103View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2970e4a - Browse repository at this point
Copy the full SHA 2970e4aView commit details
Commits on Jan 30, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4cefc91 - Browse repository at this point
Copy the full SHA 4cefc91View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.