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:
parent
6c6533fb31
commit
566e8ecce0
3 changed files with 73 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue