0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-12 04:32:58 +01:00
gitea/routers/api/v1/repo
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
..
action.go Set owner id to zero when GetRegistrationToken for repo (#31725) 2024-07-29 18:46:45 +00:00
avatar.go
blob.go Refactor names (#31405) 2024-06-19 06:32:45 +08:00
branch.go Only allow admins to rename default/protected branches (#33276) 2025-01-15 20:51:49 +00:00
collaborators.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
commits.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
compare.go [Feature] Private README.md for organization (#32872) 2024-12-31 04:22:09 +00:00
download.go Refactor context RefName and RepoAssignment (#33226) 2025-01-13 01:07:05 +00:00
file.go Refactor context RefName and RepoAssignment (#33226) 2025-01-13 01:07:05 +00:00
fork.go Refactor find forks and fix possible bugs that weak permissions check (#32528) 2024-11-18 03:06:25 +00:00
git_hook.go Refactor package (routes and error handling, npm peer dependency) (#33111) 2025-01-06 22:45:20 +08:00
git_ref.go Refactor names (#31405) 2024-06-19 06:32:45 +08:00
hook_test.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
hook.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
issue_attachment.go Include file extension checks in attachment API (#32151) 2024-11-06 21:34:32 +00:00
issue_comment_attachment.go Include file extension checks in attachment API (#32151) 2024-11-06 21:34:32 +00:00
issue_comment.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
issue_dependency.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
issue_label.go Support org labels when adding labels by label names (#32988) 2024-12-26 19:14:49 +00:00
issue_pin.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
issue_reaction.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
issue_stopwatch.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
issue_subscription.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
issue_tracked_time.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
issue.go Use CloseIssue and ReopenIssue instead of ChangeStatus (#32467) 2024-12-25 07:38:30 +00:00
key.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
label.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
language.go
license.go Support repo license (#24872) 2024-10-01 15:25:08 -04:00
main_test.go
migrate.go Move some errors to their own sub packages (#32880) 2024-12-20 18:05:29 +00:00
milestone.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
mirror.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
notes.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
patch.go Move some errors to their own sub packages (#32880) 2024-12-20 18:05:29 +00:00
pull_review.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
pull.go Automerge supports deleting branch automatically after merging (#32343) 2025-01-10 03:51:03 +08:00
release_attachment.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
release_tags.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
release.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
repo_test.go
repo.go [Feature] Private README.md for organization (#32872) 2024-12-31 04:22:09 +00:00
star.go
status.go Refactor names (#31405) 2024-06-19 06:32:45 +08:00
subscriber.go
tag.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
teams.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
topic.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
transfer.go Refactor request context (#32956) 2024-12-24 11:43:57 +08:00
tree.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
wiki.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00