gitea/services/repository
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
..
archiver Refactor context RefName and RepoAssignment (#33226) 2025-01-13 01:07:05 +00:00
commitstatus Add new event commit status creation and webhook implementation (#27151) 2024-11-07 06:41:49 +00:00
files Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
adopt_test.go Reduce integration test overhead (#32475) 2024-11-14 19:28:46 +00:00
adopt.go Refactor pprof labels and process desc (#32909) 2024-12-20 12:17:14 +08:00
avatar_test.go Fix repo avatar conflict (#32958) 2024-12-23 02:52:25 +00:00
avatar.go Fix repo avatar conflict (#32958) 2024-12-23 02:52:25 +00:00
branch.go Only allow admins to rename default/protected branches (#33276) 2025-01-15 20:51:49 +00:00
cache.go
check.go Refactor pprof labels and process desc (#32909) 2024-12-20 12:17:14 +08:00
collaboration_test.go Move AddCollabrator and CreateRepositoryByExample to service layer (#32419) 2024-11-07 11:28:11 +08:00
collaboration.go Move team related functions to service layer (#32537) 2024-11-27 21:12:26 +00:00
commit.go
contributors_graph_test.go disable gravatar in test (#32529) 2024-11-21 04:30:48 +00:00
contributors_graph.go Enable more revive linter rules (#30608) 2024-04-22 11:48:42 +00:00
create.go Make git clone URL could use current signed-in user (#33091) 2025-01-07 13:17:44 +08:00
delete_test.go
delete.go Fix repo avatar conflict (#32958) 2024-12-23 02:52:25 +00:00
fork_test.go
fork.go Refactor pprof labels and process desc (#32909) 2024-12-20 12:17:14 +08:00
generate_test.go
generate.go Make git clone URL could use current signed-in user (#33091) 2025-01-07 13:17:44 +08:00
hooks.go
init.go Refactor pprof labels and process desc (#32909) 2024-12-20 12:17:14 +08:00
lfs_test.go
lfs.go
license_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
license.go Support repo license (#24872) 2024-10-01 15:25:08 -04:00
main_test.go
merge_upstream.go Fix sync fork for consistency (#33147) 2025-01-10 05:29:55 +00:00
migrate.go Support the new exit code for git remote subcommands for git version >=2.30.0 (#33129) 2025-01-07 20:42:45 +08:00
push.go Automerge supports deleting branch automatically after merging (#32343) 2025-01-10 03:51:03 +08:00
repo_team_test.go Move team related functions to service layer (#32537) 2024-11-27 21:12:26 +00:00
repo_team.go Move RepoTransfer from models to models/repo sub package (#32506) 2024-12-18 11:44:16 +08:00
repository_test.go
repository.go Support repo license (#24872) 2024-10-01 15:25:08 -04:00
setting.go
template.go
transfer_test.go Move RepoTransfer from models to models/repo sub package (#32506) 2024-12-18 11:44:16 +08:00
transfer.go Move RepoTransfer from models to models/repo sub package (#32506) 2024-12-18 11:44:16 +08:00