Fix AccessibleTeamReposEnv.RepoIDs can not get the correct result #32733
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.
Possibly fix #32677
There are two function we can remove a member from an organization.
RemoveOrgUserandRemoveTeamMemberRemoveTeamMemberseems correct, as by my test it can correctly update the watch list.But for
RemoveOrgUser, it can not correctly remove the watch list for private repos in the organization, as there's a miss in the condition.About the fix:
If user is null or user is restricted, then we need to add the condition to filter the private repos.
But the logic now is if user is not restricted, only public repos will be count.
This line comes from:
https://github.com/go-gitea/gitea/pull/6274/files#diff-780b130df406563b7f1b2dd8add33e4160a91f9a130ef99f7282389e20ea9efbR777