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 0b5db0dcc608e9a9e79ead094a20a7775c4f9559)
(cherry picked from commit 30d168bcc867387f3c94582a4668cce62f77c171)
(cherry picked from commit 19be82b7ef11fe6e0656434dcc69c9ff2f24c702)
(cherry picked from commit 334b703b17a3fbb02e5ad20aea7241a909eb1f13)
2024-02-05 16:09:42 +01:00
..
actions [GITEA] allow viewing the latest Action Run on the web 2024-02-05 16:09:41 +01:00
badges [GITEA] Add support for shields.io-based badges 2024-02-05 16:09:42 +01:00
flags [FEAT] Repository flags 2024-02-05 16:09:42 +01:00
setting [GITEA] Optionally allow anyone to edit Wikis 2024-02-05 16:09:42 +01:00
activity.go
attachment.go
blame.go
branch.go
cherry_pick.go
commit.go [GITEA] Detect file rename and show in history 2024-02-05 16:09:40 +01:00
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 [GITEA] Fix /issues/search endpoint 2024-02-05 16:09:42 +01:00
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 [GITEA] pulls: "Edit File" button in "Files Changed" tab 2024-02-05 16:09:42 +01:00
pull_review.go
release.go [GITEA] Allow release creation on commit 2024-02-05 16:05:50 +01:00
release_test.go
render.go
repo.go Don't do a full page load when clicking Watch or Star (#29001) 2024-02-05 09:56:20 +00:00
search.go
topic.go
treelist.go
view.go [GITEA] repo: Don't redirect the repo to external units 2024-02-05 16:09:42 +01:00
view_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
wiki.go
wiki_test.go