1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-12 04:28:21 +00:00

Restricting access to fork functioanlity to users with Code access (#2542)

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz
2017-09-19 01:12:29 +02:00
committed by Kim "BKC" Carlbäcker
parent fc0c6f48c7
commit 91788e0200
3 changed files with 74 additions and 3 deletions

View File

@@ -648,7 +648,7 @@ func (repo *Repository) UpdateSize() error {
// CanBeForked returns true if repository meets the requirements of being forked.
func (repo *Repository) CanBeForked() bool {
return !repo.IsBare
return !repo.IsBare && repo.UnitEnabled(UnitTypeCode)
}
// CanEnablePulls returns true if repository meets the requirements of accepting pulls.