Fix rename branch permission bug (#32066) (#32108)

Backport #32066 by @lunny

The previous implementation requires admin permission to rename branches
which should be write permission.

Fix #31993

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Giteabot
2024-09-23 03:43:13 +08:00
committed by GitHub
parent af0cab23ea
commit 1f8cbbab3d
3 changed files with 6 additions and 7 deletions

View File

@@ -236,7 +236,7 @@
<div class="header">
{{ctx.Locale.Tr "repo.settings.rename_branch"}}
</div>
<form class="ui form" action="{{$.Repository.Link}}/settings/rename_branch" method="post">
<form class="ui form" action="{{$.Repository.Link}}/branches/rename" method="post">
<div class="content">
{{.CsrfTokenHtml}}
<div class="field default-branch-warning">