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:
committed by
Kim "BKC" Carlbäcker
parent
fc0c6f48c7
commit
91788e0200
@@ -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.
|
||||
|
Reference in New Issue
Block a user