fix(web): populate the reason for "cannot commit to branch" in web editor commit form (#39155)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Nitish-1303
2026-08-29 03:16:58 +05:30
committed by GitHub
parent 60326ca03d
commit e806566b39
12 changed files with 54 additions and 51 deletions
+1 -1
View File
@@ -874,7 +874,7 @@ func mustNotBeArchived(ctx *context.APIContext) {
}
func mustEnableEditor(ctx *context.APIContext) {
if !ctx.Repo.Repository.CanEnableEditor() {
if !ctx.Repo.Repository.CanContentChange() {
ctx.APIError(http.StatusLocked, "repo is not allowed to edit")
return
}