1
0
Fork 0
forked from forgejo/forgejo

#2505 Allow to fork and disallow to create PRs for mirrors.

This commit is contained in:
Download-Fritz 2016-02-19 20:33:06 +01:00
parent 2fdf8fc938
commit a467184e13
5 changed files with 25 additions and 11 deletions

View file

@ -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)
}