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).
4 weeks ago
..
actions Move some Actions related functions from `routers` to `services` (#33280) 4 weeks ago
agit Add reviewers selection to new pull request (#32403) 3 months ago
asymkey Move delete deploy keys into service layer (#32201) 2 months ago
attachment Include file extension checks in attachment API (#32151) 3 months ago
auth Refactor older tests to use testify (#33140) 1 month ago
automerge Automerge supports deleting branch automatically after merging (#32343) 1 month ago
context Prepare for support performance trace (#33286) 4 weeks ago
contexttest Refactor request context (#32956) 2 months ago
convert Fix typo in gitea downloader test and add missing codebase in `ToGitServiceType` (#33146) 1 month ago
cron Enable tenv and testifylint rules (#32852) 2 months ago
doctor Refactor older tests to use testify (#33140) 1 month ago
externalaccount allow synchronizing user status from OAuth2 login providers (#31572) 7 months ago
feed Refactor RefName (#33234) 1 month ago
forms Support public code/issue access for private repositories (#33127) 4 weeks ago
gitdiff Refactor older tests to use testify (#33140) 1 month ago
indexer Update issue indexer after merging a PR (#30715) 9 months ago
issue Refactor RefName (#33234) 1 month ago
lfs Fix LFS route mock, realm, middleware names (#32488) 3 months ago
mailer Refactor older tests to use testify (#33140) 1 month ago
markup Refactor request context (#32956) 2 months ago
migrations Refactor older tests to use testify (#33140) 1 month ago
mirror Fix mirror bug (#33224) 1 month 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) 3 months ago
org Refactor tests (#33021) 2 months ago
packages Refactor package (routes and error handling, npm peer dependency) (#33111) 1 month ago
projects Add issue comment when moving issues from one column to another of the project (#29311) 6 months ago
pull Automerge supports deleting branch automatically after merging (#32343) 1 month ago
release Refactor "string truncate" (#32984) 2 months ago
repository Only allow admins to rename default/protected branches (#33276) 4 weeks ago
secrets Refactor deletion (#28610) 1 year ago
task Fix "force private" logic (#31012) 9 months ago
uinotification Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
user Move some errors to their own sub packages (#32880) 2 months ago
webhook Refactor RefName (#33234) 1 month ago
webtheme Initial support for colorblindness-friendly themes (#30625) 10 months ago
wiki Refactor older tests to use testify (#33140) 1 month ago