forgejo/routers
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 Migrate to use jsoniter instead of encoding/json (#14841) 2021-03-01 22:08:10 +01:00
api/v1 Add ui.explore settings to control view of explore pages (2) (#14094) 2021-03-11 13:40:54 +00:00
dev Display ui time with customize time location (#7792) 2019-08-15 22:46:21 +08:00
events Migrate to use jsoniter instead of encoding/json (#14841) 2021-03-01 22:08:10 +01:00
org Organization removal confirmation using name not password (#14738) 2021-03-01 16:33:05 +02:00
private Migrate to use jsoniter instead of encoding/json (#14841) 2021-03-01 22:08:10 +01:00
repo Fix migration context data (#14910) 2021-03-07 20:21:09 +01:00
routes Add ui.explore settings to control view of explore pages (2) (#14094) 2021-03-11 13:40:54 +00:00
user Add SameSite setting for cookies (#14900) 2021-03-07 08:12:43 +00:00
utils Clarify the suffices and prefixes of setting.AppSubURL and setting.AppURL (#12999) 2021-02-19 22:36:43 +01:00
home.go Add ui.explore settings to control view of explore pages (2) (#14094) 2021-03-11 13:40:54 +00:00
init.go Print usefull error if SQLite is used in settings but not supported (#14476) 2021-01-27 04:57:18 +01:00
install.go Add SameSite setting for cookies (#14900) 2021-03-07 08:12:43 +00:00
metrics.go Move metrics from macaron to chi (#13601) 2020-11-17 15:50:06 -05:00
swagger_json.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00