mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-30 01:30:46 +00: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:
@@ -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