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 authored and Kim "BKC" Carlbäcker committed 2017-09-19 01:12:29 +02:00
1 parent fc0c6f48c7
commit 91788e0200
3 files changed
+74 -3

No files matched your search

+1 -1
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.