-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Ensure that feeds are appropriately restricted #10018
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
Merged
zeripath
merged 7 commits into
go-gitea:master
from
zeripath:fix-9981-limited-hidden-activity
Jan 28, 2020
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cfef824
Always limit results by what is accessible to the user
zeripath d6548c2
Change signature of AccessibleRepoIDsQuery
zeripath 45a89f4
Ensure that user with ID <= 0 is handled
zeripath 3923185
Update models/repo_list.go
zeripath c68997a
Merge branch 'master' into fix-9981-limited-hidden-activity
zeripath 6a33a74
Merge branch 'master' into fix-9981-limited-hidden-activity
zeripath 0c03606
Merge branch 'master' into fix-9981-limited-hidden-activity
zeripath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it strange that
user ==nil
enablesVisibleTypeLimited
orgs three lines below?I was under the impression that user == nil (or user.ID <= 0) meant anonymous/unidentified.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not enabling it - rather restricting them away further. But I should probably add the user ID <= 0 test to that too - DONE
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not your fault, the code is previous to your PR. I've just noticed it:If I read this right, it's: user can see it if "repository is not private or (rest of the condition)". A limited org has public repos that anonymous users should not be able to see. This condition will make those repos pass, since they've gotis_private == false
.I'm pretty tired, so
I might beI'm getting this wrong.