diff options
author | Jonas Franz <info@jonasfranz.software> | 2017-09-18 16:52:20 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-09-18 22:52:20 +0800 |
commit | 566e8ecce0df27e09d9f3ed9503f788827cc1102 (patch) | |
tree | a48ae27031a1d62aaa20a4ac2a44b0bb332bbd73 /models | |
parent | 6c6533fb31bbc82e7907b1dc233212045849569b (diff) | |
download | gitea-566e8ecce0df27e09d9f3ed9503f788827cc1102.tar.gz gitea-566e8ecce0df27e09d9f3ed9503f788827cc1102.zip |
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
Diffstat (limited to 'models')
-rw-r--r-- | models/repo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go index 4b3b0322d6..4c844d9b56 100644 --- a/models/repo.go +++ b/models/repo.go @@ -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. |