mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-05 12:33:23 +09:00
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:
co-authored by
wxiaoguang
parent
60326ca03d
commit
e806566b39
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user