[BUG] Detect protected branch on branch rename

- If a branch cannot be renamed due to a protected branch rule, show
this error in the UI instead of throwing an internal server error.
- Add integration test (also simplify the existing one).
- Resolves #2751
This commit is contained in:
Gusted 2024-03-26 01:39:15 +01:00
parent 5194bd15ef
commit 0f79122053
No known key found for this signature in database
GPG key ID: FD821B732837125F
3 changed files with 61 additions and 23 deletions

View file

@ -2513,6 +2513,7 @@ settings.lfs_pointers.inRepo=In Repo
settings.lfs_pointers.exists=Exists in store
settings.lfs_pointers.accessible=Accessible to User
settings.lfs_pointers.associateAccessible=Associate accessible %d OIDs
settings.rename_branch_failed_protected=Cannot rename branch %s because it is a protected branch.
settings.rename_branch_failed_exist=Cannot rename branch because target branch %s exists.
settings.rename_branch_failed_not_exist=Cannot rename branch %s because it does not exist.
settings.rename_branch_success =Branch %s was successfully renamed to %s.