diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-04-26 02:59:10 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-04-25 21:59:10 +0300 |
commit | 199faadea3ff40880d70c8bc031aab800720330d (patch) | |
tree | 274117bd848e3cbf9c7f9fb3057814fd76552e83 /modules | |
parent | e8f4c7733a822eb6bb04909dbf70f2de679522b7 (diff) | |
download | gitea-199faadea3ff40880d70c8bc031aab800720330d.tar.gz gitea-199faadea3ff40880d70c8bc031aab800720330d.zip |
Fix org visibility bug when git cloning (#6743)
* fix org visibility bug
* fix permission check
* add integration tests
* fix tests
* change test user name for easier maintainance and fix test
* fix test git repo name
Diffstat (limited to 'modules')
-rw-r--r-- | modules/context/repo.go | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 770296b390..f9ed9327ff 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -236,12 +236,6 @@ func repoAssignment(ctx *Context, repo *models.Repository) { return } - if repo.Owner.IsOrganization() { - if !models.HasOrgVisible(repo.Owner, ctx.User) { - ctx.NotFound("HasOrgVisible", nil) - return - } - } ctx.Repo.Permission, err = models.GetUserRepoPermission(repo, ctx.User) if err != nil { ctx.ServerError("GetUserRepoPermission", err) |