jojo/routers
forgejo-backport-action 72d35af26a [v14.0/forgejo] fix: comment attachment API is more restrictive than the web UI (#11742)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/11623

The permission check for editing the attachments of a comment (adding or removing them) is changed to be the same as when editing the textual body of the comment.

The poster of a comment can always edit it via the web UI, which includes the ability to remove or add attachments. It does not require write permission on the issue or pull unit of the repository.

The API is consistent with the web UI in how it [verifies permissions for editing comments][0] when modifying the textual content. However, when adding or removing the attachments of a comment, it [also requires write permissions][1] on the issue or pull unit, which is inconsistent with the web UI and more restrictive.

[0]: a581059606/routers/api/v1/repo/issue_comment.go (L606)
[1]: a581059606/routers/api/v1/repo/issue_comment_attachment.go (L359)

Co-authored-by: limiting-factor <limiting-factor@posteo.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11742
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2026-03-19 04:19:17 +01:00
..
api [v14.0/forgejo] fix: comment attachment API is more restrictive than the web UI (#11742) 2026-03-19 04:19:17 +01:00
common chore: rename 'migrations' to 'gitea_migrations' 2025-10-14 14:40:49 -06:00
install [v14.0/forgejo] fix: don't clobber authorized_keys file during installation (#10948) (#11009) 2026-01-23 21:29:47 +01:00
private chore: ensure consistent import aliasing for services and models (#10253) 2025-11-30 17:00:57 +01:00
utils [PORT] drop utils.IsExternalURL (and expand IsRiskyRedirectURL tests) (#3167) 2024-04-15 13:03:08 +00:00
web [v14.0/forgejo] fix: Forgejo Security Patches, 2026-03-09 (#11514) 2026-03-09 06:35:39 +01:00
init.go [v14.0/forgejo] fix: don't clobber authorized_keys file during installation (#10948) (#11009) 2026-01-23 21:29:47 +01:00