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/services
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).
2 weeks ago
..
actions Move some Actions related functions from `routers` to `services` (#33280) 2 weeks ago
agit Add reviewers selection to new pull request (#32403) 3 months ago
asymkey Move delete deploy keys into service layer (#32201) 1 month ago
attachment
auth Refactor older tests to use testify (#33140) 3 weeks ago
automerge Automerge supports deleting branch automatically after merging (#32343) 3 weeks ago
context Prepare for support performance trace (#33286) 2 weeks ago
contexttest Refactor request context (#32956) 1 month ago
convert Fix typo in gitea downloader test and add missing codebase in `ToGitServiceType` (#33146) 3 weeks ago
cron Enable tenv and testifylint rules (#32852) 2 months ago
doctor Refactor older tests to use testify (#33140) 3 weeks ago
externalaccount
feed Refactor RefName (#33234) 3 weeks ago
forms Support public code/issue access for private repositories (#33127) 2 weeks ago
gitdiff Refactor older tests to use testify (#33140) 3 weeks ago
indexer
issue Refactor RefName (#33234) 3 weeks ago
lfs Fix LFS route mock, realm, middleware names (#32488) 3 months ago
mailer Refactor older tests to use testify (#33140) 3 weeks ago
markup Refactor request context (#32956) 1 month ago
migrations Refactor older tests to use testify (#33140) 3 weeks ago
mirror Fix mirror bug (#33224) 3 weeks ago
notify Add new event commit status creation and webhook implementation (#27151) 3 months ago
oauth2_provider Introduce OrgList and add LoadTeams, optimaze Load teams for orgs (#32543) 2 months ago
org Refactor tests (#33021) 1 month ago
packages Refactor package (routes and error handling, npm peer dependency) (#33111) 4 weeks ago
projects
pull Automerge supports deleting branch automatically after merging (#32343) 3 weeks ago
release Refactor "string truncate" (#32984) 1 month ago
repository Only allow admins to rename default/protected branches (#33276) 2 weeks ago
secrets
task
uinotification
user Move some errors to their own sub packages (#32880) 1 month ago
webhook Refactor RefName (#33234) 3 weeks ago
webtheme
wiki Refactor older tests to use testify (#33140) 3 weeks ago