Commit graph

2 commits

Author SHA1 Message Date
forgejo-backport-action
fb0ab1e5fa [v16.0/forgejo] chore(refactor): remove GetX redundant accessors and use X in services/context/api.go (#13217)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/13215

Followup of the refactor adding setter/getter to APIContext  https://codeberg.org/forgejo/forgejo/pulls/13143

- Only has an impact on the getters used by `routers/api/v1/permissions`
- When GetX and X both exist, remove GetX
- When GetX exists and X does not, rename GetX to X
- GetOrg is an exception as it would conflict with Org and is renamed Organization. This is due to APIContext having its own Org structure that includes an Organization.

Co-authored-by: limiting-factor <limiting-factor@posteo.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13217
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
2026-06-27 22:44:01 +02:00
limiting-factor
b296496356
chore: refactor REST API permission check 2026-06-20 22:58:56 +02:00