-
-
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
Calculate PublicOnly
for org membership only once
#32234
base: main
Are you sure you want to change the base?
Conversation
PublicOnly
for org membership only once
As a habit, we almost check permission in service layer but not in models layer. What's the problem with the previous code? |
I can create a new func in the service witch checks permissions ... but we would have to alter the existing code a lot and i want to only touch it here for a explizite context ... : the refactoring that makes the #32211 diff smal |
the determination if a user can see public or private org membership is determined in different places ... I want to have that check in a single place ... |
This reverts commit 3af5ae7. because of error: "Unsupported condition type"
@lunny to #32234 (comment) i tryed: 3af5ae7 see https://github.com/go-gitea/gitea/actions/runs/11331009974/job/31510076461?pr=32234 it does not work, it errors with: |
(I tried to have a single source of truth for the query ... but if preferred i will just use duplicated code by have a builder version and classic xorm version) |
this needs an answer to move forward from @lunny ... |
@lunny anything else? |
Refactoring of #32211
this move the PublicOnly() filter calcuation next to the DB querys and let it be decided by the Doer
Sponsored by Kithara Software GmbH