You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers
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).
3 weeks ago
..
api Only allow admins to rename default/protected branches (#33276) 3 weeks ago
common Fix bleve fuzziness search (#33078) 1 month ago
install Refactor request context (#32956) 2 months ago
private Automerge supports deleting branch automatically after merging (#32343) 4 weeks ago
utils Refactor older tests to use testify (#33140) 4 weeks ago
web Only allow admins to rename default/protected branches (#33276) 3 weeks ago
init.go Prepare for support performance trace (#33286) 3 weeks ago