- 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)
17 lines
324 B
YAML
17 lines
324 B
YAML
-
|
|
id: 1
|
|
issue_id: 1
|
|
comment_id: 3
|
|
edited_unix: 1687612839
|
|
content_text: Original Text
|
|
is_first_created: true
|
|
is_deleted: false
|
|
|
|
-
|
|
id: 2
|
|
issue_id: 1
|
|
comment_id: 3
|
|
edited_unix: 1687612840
|
|
content_text: "meh..." # This has to be consistent with comment.yml
|
|
is_first_created: false
|
|
is_deleted: false
|