mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fork permission bug fixes (#2534)
* Hotfix for "Add time manually" (https://github.com/go-gitea/gitea/pull/2211#issuecomment-328780125) Signed-off-by: Jonas Franz <info@jonasfranz.software> * Checking if Code unit is enabled before creating a fork. Signed-off-by: Jonas Franz <info@jonasfranz.software> * Adding a discrete function for RepoIDAssignment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Improved Documentation
This commit is contained in:
@@ -638,7 +638,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