mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
#2505 Allow to fork and disallow to create PRs for mirrors.
This commit is contained in:
@@ -48,7 +48,9 @@ func MustEnableIssues(ctx *middleware.Context) {
|
||||
}
|
||||
|
||||
func MustEnablePulls(ctx *middleware.Context) {
|
||||
if !ctx.Repo.Repository.EnablePulls {
|
||||
if !ctx.Repo.Repository.CanEnablePulls() {
|
||||
ctx.Handle(404, "Unsupported", nil)
|
||||
} else if !ctx.Repo.Repository.EnablePulls {
|
||||
ctx.Handle(404, "MustEnablePulls", nil)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user