1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-10-05 19:30:58 +00:00
forgejo/routers/api/v1
forgejo-backport-action 4214fea8b1 [v12.0/forgejo] fix: return error when user is not repo writer (#8696)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/8690

- If the doer isn't a issue/pull writer, return a error.
- Fixes a panic (NPE), because the callers of `prepareForReplaceOrAdd` simply checked if there was a error returned to see if the user was allowed. It didn't check if a statuscode was written. This is specifically a issue when the automatic token by Forgejo actions is used.

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8696
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2025-07-27 12:58:35 +02:00
..
activitypub chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
admin chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
misc feat(sec): Add SSH signing support for instances (#6897) 2025-04-11 13:25:35 +00:00
notify chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
org feat: relax email requirements (#7829) 2025-05-22 12:20:25 +02:00
packages chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
repo [v12.0/forgejo] fix: return error when user is not repo writer (#8696) 2025-07-27 12:58:35 +02:00
settings chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
shared chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
swagger bug: unify RepoActionRun and ActionRun structs (#8250) 2025-06-23 07:54:32 +02:00
user chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
utils chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
api.go [v12.0/forgejo] Revert "feat: remove API authentication methods that uses the URL query (#7924)" (#8653) 2025-07-24 17:53:11 +02:00