gitea/tests
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
..
e2e Refactor env var related code (#33075) 2025-01-02 11:36:50 +08:00
fuzz Fix fuzz test (#33156) 2025-01-09 15:15:47 +08:00
gitea-lfs-meta Test views of LFS files (#22196) 2022-12-23 07:41:56 +08:00
gitea-repositories-meta Remove some unnecessary template helpers (#33069) 2025-01-01 18:02:34 +08:00
integration Only allow admins to rename default/protected branches (#33276) 2025-01-15 20:51:49 +00:00
testdata/data Add artifacts test fixture (#30300) 2024-11-01 10:29:54 +08:00
mssql.ini.tmpl Remove some unnecessary template helpers (#33069) 2025-01-01 18:02:34 +08:00
mysql.ini.tmpl Remove some unnecessary template helpers (#33069) 2025-01-01 18:02:34 +08:00
pgsql.ini.tmpl Remove some unnecessary template helpers (#33069) 2025-01-01 18:02:34 +08:00
sqlite.ini.tmpl Remove some unnecessary template helpers (#33069) 2025-01-01 18:02:34 +08:00
test_utils.go Add sub issue list support (#32940) 2024-12-24 01:54:19 +00:00