diff options
author | Unknwon <u@gogs.io> | 2015-11-18 15:01:11 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-11-18 15:01:11 -0500 |
commit | 9a0902523b36dcf086aa0eafcfb9e93131bc027c (patch) | |
tree | e16a4a99ac9bb84cc9a881a28b04f9e6a1b4f702 /routers | |
parent | d2808e38feff3cfb2b5ceb014d5f26a79a3c540f (diff) | |
download | gitea-9a0902523b36dcf086aa0eafcfb9e93131bc027c.tar.gz gitea-9a0902523b36dcf086aa0eafcfb9e93131bc027c.zip |
fix #1987
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/setting.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index 089c939ec0..bee29254c5 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -85,6 +85,12 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) { } repo.Description = form.Description repo.Website = form.Website + + // Visibility of forked repository is forced sync with base repository. + if repo.IsFork { + form.Private = repo.BaseRepo.IsPrivate + } + visibilityChanged := repo.IsPrivate != form.Private repo.IsPrivate = form.Private if err := models.UpdateRepository(repo, visibilityChanged); err != nil { |