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

Add permission check to LoadIssuesFromBoard #29643

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

yp05327
Copy link
Contributor

@yp05327 yp05327 commented Mar 7, 2024

A part of #22865

We already have AllPublic option, but why still need to add PublicRepoCond again in issuePullAccessibleRepoCond ?

Then condition will look like:

where [PublicRepoCond] and [issuePullAccessibleRepoCond] and [other conditions]

If AllPublic is true and opts.User is not nil, because of the relationship and, we will only find public repos of doer owned/ listed in access table/ assigned,mentioned or created issues in it, so other public repos will be ignored.
But it is not correct, as doer can also access these public repos.

#23630 maybe related.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 7, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 7, 2024
@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 7, 2024
@yp05327 yp05327 marked this pull request as draft March 7, 2024 06:48
@yp05327
Copy link
Contributor Author

yp05327 commented Mar 7, 2024

How to print executed SQL query in tests? It is so strange that only auto test not pass, manual test is ok.
image

@yp05327 yp05327 force-pushed the fix-wrong-issues-in-projects branch from 33fe41f to ef37c2b Compare March 19, 2024 08:22
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants