Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-27 12:16:10 +01:00
forgejo/tests/integration/fixtures
Gusted ab1ccc55dc
[GITEA] Fix panic in canSoftDeleteContentHistory
- Backport of #2134
- 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)
2024-01-13 22:05:35 +01:00
..
TestAdminDeleteUser [MODERATION] User blocking 2023-11-13 13:58:02 +01:00
TestBlockActions [MODERATION] User blocking (squash) do not use shared fixture 2023-11-26 13:56:00 +01:00
TestGetContentHistory [GITEA] Fix panic in canSoftDeleteContentHistory 2024-01-13 22:05:35 +01:00