mirror of
https://github.com/go-gitea/gitea
synced 2025-01-19 06:04:26 +00:00
2483a93fbc
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).
180 lines
1.4 KiB
YAML
180 lines
1.4 KiB
YAML
-
|
|
id: 1
|
|
user_id: 2
|
|
repo_id: 3
|
|
mode: 4
|
|
|
|
-
|
|
id: 2
|
|
user_id: 2
|
|
repo_id: 5
|
|
mode: 4
|
|
|
|
-
|
|
id: 3
|
|
user_id: 2
|
|
repo_id: 24
|
|
mode: 2
|
|
|
|
-
|
|
id: 4
|
|
user_id: 2
|
|
repo_id: 32
|
|
mode: 4
|
|
|
|
-
|
|
id: 5
|
|
user_id: 4
|
|
repo_id: 3
|
|
mode: 2
|
|
|
|
-
|
|
id: 6
|
|
user_id: 4
|
|
repo_id: 4
|
|
mode: 2
|
|
|
|
-
|
|
id: 7
|
|
user_id: 4
|
|
repo_id: 40
|
|
mode: 2
|
|
|
|
-
|
|
id: 8
|
|
user_id: 10
|
|
repo_id: 21
|
|
mode: 2
|
|
|
|
-
|
|
id: 9
|
|
user_id: 10
|
|
repo_id: 32
|
|
mode: 2
|
|
|
|
-
|
|
id: 10
|
|
user_id: 15
|
|
repo_id: 21
|
|
mode: 2
|
|
|
|
-
|
|
id: 11
|
|
user_id: 15
|
|
repo_id: 22
|
|
mode: 2
|
|
|
|
-
|
|
id: 12
|
|
user_id: 15
|
|
repo_id: 23
|
|
mode: 4
|
|
|
|
-
|
|
id: 13
|
|
user_id: 15
|
|
repo_id: 24
|
|
mode: 4
|
|
|
|
-
|
|
id: 14
|
|
user_id: 15
|
|
repo_id: 32
|
|
mode: 2
|
|
|
|
-
|
|
id: 15
|
|
user_id: 18
|
|
repo_id: 21
|
|
mode: 2
|
|
|
|
-
|
|
id: 16
|
|
user_id: 18
|
|
repo_id: 22
|
|
mode: 2
|
|
|
|
-
|
|
id: 17
|
|
user_id: 18
|
|
repo_id: 23
|
|
mode: 4
|
|
|
|
-
|
|
id: 18
|
|
user_id: 18
|
|
repo_id: 24
|
|
mode: 4
|
|
|
|
-
|
|
id: 19
|
|
user_id: 20
|
|
repo_id: 24
|
|
mode: 1
|
|
|
|
-
|
|
id: 20
|
|
user_id: 20
|
|
repo_id: 27
|
|
mode: 4
|
|
|
|
-
|
|
id: 21
|
|
user_id: 20
|
|
repo_id: 28
|
|
mode: 4
|
|
|
|
-
|
|
id: 22
|
|
user_id: 29
|
|
repo_id: 4
|
|
mode: 2
|
|
|
|
-
|
|
id: 23
|
|
user_id: 29
|
|
repo_id: 24
|
|
mode: 1
|
|
|
|
-
|
|
id: 24
|
|
user_id: 31
|
|
repo_id: 27
|
|
mode: 4
|
|
|
|
-
|
|
id: 25
|
|
user_id: 31
|
|
repo_id: 28
|
|
mode: 4
|
|
|
|
-
|
|
id: 26
|
|
user_id: 38
|
|
repo_id: 60
|
|
mode: 2
|
|
|
|
-
|
|
id: 27
|
|
user_id: 38
|
|
repo_id: 61
|
|
mode: 1
|
|
|
|
-
|
|
id: 28
|
|
user_id: 39
|
|
repo_id: 61
|
|
mode: 1
|
|
|
|
-
|
|
id: 29
|
|
user_id: 40
|
|
repo_id: 61
|
|
mode: 4
|
|
|
|
-
|
|
id: 30
|
|
user_id: 40
|
|
repo_id: 1
|
|
mode: 2
|