1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-02 15:09:33 -05:00
gitea/routers/web/repo/setting
Kemal Zebari 2483a93fbc
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
..
avatar.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
collaboration.go Move RepoTransfer from models to models/repo sub package (#32506) 2024-12-18 11:44:16 +08:00
default_branch.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
deploy_key.go Move delete deploy keys into service layer (#32201) 2024-12-18 04:10:38 +00:00
git_hooks.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
lfs.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
protected_branch.go Only allow admins to rename default/protected branches (#33276) 2025-01-15 20:51:49 +00:00
protected_tag.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
runners.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
secrets.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
setting.go Support public code/issue access for private repositories (#33127) 2025-01-14 01:53:34 +00:00
settings_test.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
variables.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
webhook.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00