You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
3 years ago
..
setting Prevent NPE when cache service is disabled (#19703) (#19783) 3 years ago
avatar.go Move user related model into models/user (#17781) 3 years ago
home.go Fix issue overview for teams (#19652) (#19653) 3 years ago
home_test.go Decouple unit test code from business code (#17623) 3 years ago
main_test.go Decouple unit test code from business code (#17623) 3 years ago
notification.go Fix NotificationUnreadCount (#19802) 3 years ago
profile.go Move POST /{username}/action/{action} to simply POST /{username} (#18045) 3 years ago
task.go Correctly handle failed migrations (#17575) 3 years ago