forgejo/routers/api/v1
zeripath c8e5c79cfd
Add ui.explore settings to control view of explore pages (2) (#14094)
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 <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
2021-03-11 13:40:54 +00:00
..
admin [API] Add Restricted Field to User (#14630) 2021-02-18 16:25:35 +08:00
misc
notify
org Clarify the suffices and prefixes of setting.AppSubURL and setting.AppURL (#12999) 2021-02-19 22:36:43 +01:00
repo Make manual merge autodetection optional and add manual merge as merge method (#12543) 2021-03-03 22:41:23 -05:00
settings Export LFS & TimeTracking function status (#14753) 2021-02-20 11:17:51 +01:00
swagger Add dismiss review feature (#12674) 2021-02-11 18:32:25 +01:00
user
utils Migrate to use jsoniter instead of encoding/json (#14841) 2021-03-01 22:08:10 +01:00
api.go Add ui.explore settings to control view of explore pages (2) (#14094) 2021-03-11 13:40:54 +00:00