0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-07 11:54:34 +01:00
gitea/routers/web
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
..
admin Remove some unnecessary template helpers (#33069) 2025-01-01 18:02:34 +08:00
auth Support for email addresses containing uppercase characters when activating user account (#32998) 2024-12-27 19:16:23 +08:00
devtest De-emphasize signed commits (#31160) 2024-12-28 04:18:30 +08:00
events Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
explore Fix bleve fuzziness search (#33078) 2025-01-03 00:32:02 +08:00
feed Refactor context RefName and RepoAssignment (#33226) 2025-01-13 01:07:05 +00:00
healthcheck Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
misc Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
org Use project's redirect url instead of composing url (#33058) 2024-12-31 19:19:53 +08:00
repo Only allow admins to rename default/protected branches (#33276) 2025-01-15 20:51:49 +00:00
shared [Feature] Private README.md for organization (#32872) 2024-12-31 04:22:09 +00:00
user Fix bleve fuzziness search (#33078) 2025-01-03 00:32:02 +08:00
base.go Prepare for support performance trace (#33286) 2025-01-15 20:05:18 +00:00
githttp.go Fix LFS route mock, realm, middleware names (#32488) 2024-11-13 16:58:09 +08:00
goget.go Make git clone URL could use current signed-in user (#33091) 2025-01-07 13:17:44 +08:00
home.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
metrics.go
nodeinfo.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
passkey.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
swagger_json.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
web.go Prepare for support performance trace (#33286) 2025-01-15 20:05:18 +00:00
webfinger.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00