-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 ui.explore settings to control view of explore pages #13687
Add ui.explore settings to control view of explore pages #13687
Conversation
Add `[ui.explore]` settings to allow restricting the explore pages to logged in users only and to restrict the showing of users to only those with publically available repositories. The two proposed settings are: - `REQUIRE_SIGNIN_VIEW`: Only allows access to the explore pages if the user is signed in. Also restricts `/api/v1/user/search`. - `ONLY_SHOW_USERS_WITH_PUBLIC_REPOS`: Only shows users with public repos on the explore page. `/api/v1/user/search` will only show users with public repos unless the user the is signed in. Fix go-gitea#2908 Signed-off-by: Andrew Thornton <[email protected]>
This is likely to need further thought and we should think about the api calls for repositories too. |
Signed-off-by: a1012112796 <[email protected]>
chinese translation
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Imho we don't need special app.ini settings for this. My proposal would be:
|
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #13687 +/- ##
==========================================
- Coverage 42.27% 42.24% -0.04%
==========================================
Files 697 698 +1
Lines 76616 76695 +79
==========================================
+ Hits 32389 32396 +7
- Misses 38908 38971 +63
- Partials 5319 5328 +9
Continue to review full report at Codecov.
|
I think there's still likely to be a point for findability for public repositories and users with public repos. |
I would guess however that we should default to only showing users with public repositories |
There is not much point in listing users with public repositories, it will be resource intensive imho and usually everyone are still using repository listing |
Please resolve the conflicts |
Signed-off-by: Andrew Thornton <[email protected]>
Conflicts fixed |
Signed-off-by: Andrew Thornton <[email protected]>
conflicts fixed again |
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
This is an alternative PR to #13687. Add `[ui.explore]` settings to allow restricting the explore pages to logged in users only and to disable the users explore page. The two proposed settings are: - `REQUIRE_SIGNIN_VIEW`: Only allows access to the explore pages if the user is signed in. Also restricts - `/api/v1/user/search` - `/api/v1/users/{username}` - `/api/v1/users/{username}/repos` - but does not restrict `/api/v1/users/{username}/heatmap` - `DISABLE_USERS_PAGE`: Disables the /explore/users page Fix #2908 Close #13687 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: 6543 <[email protected]>
Add
[ui.explore]
settings to allow restricting theexplore pages to logged in users only and to restrict
the showing of users to only those with publically available
repositories.
The two proposed settings are:
REQUIRE_SIGNIN_VIEW
: Only allows access to the explore pages if theuser is signed in. Also restricts
/api/v1/user/search
/api/v1/users/{username}
/api/v1/users/{username}/repos
/api/v1/users/{username}/heatmap
ONLY_SHOW_USERS_WITH_PUBLIC_REPOS
: Only shows users with publicrepos on the explore page.
/api/v1/user/search
will only show userswith public repos unless the user the is signed in.
Fix #2908
Close #14094
Signed-off-by: Andrew Thornton [email protected]