summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-03-16 04:52:11 -0400
committerUnknwon <u@gogs.io>2015-03-16 04:52:11 -0400
commitfc6db829b2040227bb9dac6d243a9f94c5651154 (patch)
tree2933da30cc9b49919397999ebcb41485e49545ad /routers
parent588f3215c6c4a82c7ad9cbd2cc6a5683d0ca3cc2 (diff)
downloadgitea-fc6db829b2040227bb9dac6d243a9f94c5651154.tar.gz
gitea-fc6db829b2040227bb9dac6d243a9f94c5651154.zip
fix read access team visibility of private repo
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/repo.go2
-rw-r--r--routers/repo/setting.go3
2 files changed, 3 insertions, 2 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index a70f31e614..8884bea3ab 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -356,7 +356,7 @@ func Action(ctx *middleware.Context) {
ctx.Repo.Repository.Description = ctx.Query("desc")
ctx.Repo.Repository.Website = ctx.Query("site")
- err = models.UpdateRepository(ctx.Repo.Repository)
+ err = models.UpdateRepository(ctx.Repo.Repository, false)
}
if err != nil {
diff --git a/routers/repo/setting.go b/routers/repo/setting.go
index 5b9b672c04..be21405bf6 100644
--- a/routers/repo/setting.go
+++ b/routers/repo/setting.go
@@ -78,8 +78,9 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) {
}
ctx.Repo.Repository.Description = form.Description
ctx.Repo.Repository.Website = form.Website
+ visibilityChanged := ctx.Repo.Repository.IsPrivate != form.Private
ctx.Repo.Repository.IsPrivate = form.Private
- if err := models.UpdateRepository(ctx.Repo.Repository); err != nil {
+ if err := models.UpdateRepository(ctx.Repo.Repository, visibilityChanged); err != nil {
ctx.Handle(404, "UpdateRepository", err)
return
}