forgejo/routers/web/repo
Gusted 2cfcd266b4
[GITEA] Fix panic in canSoftDeleteContentHistory
- It's possible that `canSoftDeleteContentHistory` is called without
`ctx.Doer` being set, such as an anonymous user requesting the
`/content-history/detail` endpoint.
- Add a simple condition to always set to `canSoftDelete` to false if an
anonymous user is requesting this, this avoids a panic in the code that
assumes `ctx.Doer` is set.
- Added integration testing.

(cherry picked from commit 0b5db0dcc6)
(cherry picked from commit 30d168bcc8)
(cherry picked from commit 19be82b7ef)
(cherry picked from commit 334b703b17)
2024-02-05 16:09:42 +01:00
..
actions
badges
flags
setting
activity.go
attachment.go
blame.go
branch.go
cherry_pick.go
commit.go
compare.go
download.go
editor.go [GITEA] Allow user to select email for file operations in Web UI 2024-02-05 16:09:41 +01:00
editor_test.go
find.go
githttp.go
githttp_test.go
helper.go
helper_test.go
issue.go
issue_content_history.go [GITEA] Fix panic in canSoftDeleteContentHistory 2024-02-05 16:09:42 +01:00
issue_dependency.go
issue_label.go
issue_label_test.go
issue_lock.go
issue_pin.go
issue_stopwatch.go
issue_test.go
issue_timetrack.go
issue_watch.go
main_test.go
middlewares.go
migrate.go
milestone.go
packages.go
patch.go
projects.go
projects_test.go
pull.go
pull_review.go
release.go
release_test.go
render.go
repo.go
search.go
topic.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
treelist.go
view.go
view_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
wiki.go
wiki_test.go