1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-10 20:24:24 +00:00
gitea/routers/web/user
zeripath ccc11c1e77
Prevent NPE when cache service is disabled (#19703) (#19783)
Backport #19703

The cache service can be disabled - at which point ctx.Cache will be nil
and the use of it will cause an NPE.

The main part of this PR is that the cache is used for restricting
resending of activation mails and without this we cache we cannot
restrict this. Whilst this code could be re-considered to use the db and
probably should be, I think we can simply disable this code in the case
that the cache is disabled.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
2022-05-25 19:49:59 +08:00
..
setting Prevent NPE when cache service is disabled (#19703) (#19783) 2022-05-25 19:49:59 +08:00
avatar.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
home_test.go Decouple unit test code from business code (#17623) 2021-11-12 22:36:47 +08:00
home.go Fix issue overview for teams (#19652) (#19653) 2022-05-16 17:48:16 +08:00
main_test.go Decouple unit test code from business code (#17623) 2021-11-12 22:36:47 +08:00
notification.go Fix NotificationUnreadCount (#19802) 2022-05-25 07:38:21 +03:00
profile.go Move POST /{username}/action/{action} to simply POST /{username} (#18045) 2021-12-20 17:18:26 +00:00
task.go Correctly handle failed migrations (#17575) 2021-11-13 19:28:50 +08:00