mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-10 11:25:56 -05:00
ab1ccc55dc
- 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
|
||
---|---|---|
.. | ||
TestAdminDeleteUser | ||
TestBlockActions | ||
TestGetContentHistory |