gitea/routers/api/v1
Kemal Zebari 2483a93fbc
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
Only allow admins to rename default/protected branches (#33276)
Currently, anyone with write permissions to a repo are able to rename
default or protected branches.

This change follows
[GitHub's](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch)
design by only allowing repo/site admins to change these branches.
However, it also follows are current design for protected branches and
only allows admins to modify branch names == branch protection rule
names. Glob-based rules cannot be renamed by anyone (as was already the
case, but we now catch `ErrBranchIsProtected` which we previously did
not catch, throwing a 500).
2025-01-15 20:51:49 +00:00
..
activitypub Remove SHA1 for support for ssh rsa signing (#31857) 2024-09-07 18:05:18 -04:00
admin Let API create and edit system webhooks, attempt 2 (#33180) 2025-01-13 17:17:39 +00:00
misc Fix markup render regression and fix some tests (#32640) 2024-11-26 03:04:55 +08:00
notify Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
org Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
packages remove util.OptionalBool and related functions (#29513) 2024-03-02 16:42:31 +01:00
repo Only allow admins to rename default/protected branches (#33276) 2025-01-15 20:51:49 +00:00
settings Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
shared Refactor names (#31405) 2024-06-19 06:32:45 +08:00
swagger Fix sync fork for consistency (#33147) 2025-01-10 05:29:55 +00:00
user Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
utils Move admin routers from /admin to /-/admin (#32189) 2024-10-10 04:56:49 +00:00
api.go Fix sync fork for consistency (#33147) 2025-01-10 05:29:55 +00:00