diff options
author | Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> | 2020-06-07 02:45:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-06 20:45:12 -0400 |
commit | 94f60e199bc504c6cfb7b853889e3ceb2a837adc (patch) | |
tree | 4bfcb10071d6b8356863f11370d91b91b19894bc /routers/repo/setting.go | |
parent | 594db7fb433a386603c09676542bb0ec2e700935 (diff) | |
download | gitea-94f60e199bc504c6cfb7b853889e3ceb2a837adc.tar.gz gitea-94f60e199bc504c6cfb7b853889e3ceb2a837adc.zip |
Fix visibility of forked public repos from private orgs (#11717)
* Fix visibility of forked public repos from private orgs
* update forks visibility when org visibility is changed
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r-- | routers/repo/setting.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index dff13ff5b3..1433bedb3b 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -102,7 +102,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) { // Visibility of forked repository is forced sync with base repository. if repo.IsFork { - form.Private = repo.BaseRepo.IsPrivate + form.Private = repo.BaseRepo.IsPrivate || repo.BaseRepo.Owner.Visibility == structs.VisibleTypePrivate } visibilityChanged := repo.IsPrivate != form.Private |