diff options
author | mrsdizzie <info@mrsdizzie.com> | 2019-05-16 11:48:40 -0400 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-05-16 11:48:40 -0400 |
commit | 68a83cc5a240504e7d35ed2cdc1fae889fc08a1b (patch) | |
tree | 8f7a331c3d06f98a7680ffd3fcd654beef49b972 /integrations | |
parent | d9dcd093403b3194bcf3b4be36eaf90250e06ed1 (diff) | |
download | gitea-68a83cc5a240504e7d35ed2cdc1fae889fc08a1b.tar.gz gitea-68a83cc5a240504e7d35ed2cdc1fae889fc08a1b.zip |
Allow collaborators to view repo owned private org (#6965)
Handle case where an orginization is private but a user who is not a
member of the orgninization has been added as a collaborator of a repo
within that org
Fixes #6962
Diffstat (limited to 'integrations')
-rw-r--r-- | integrations/org_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/integrations/org_test.go b/integrations/org_test.go index 17b8958480..d86c82989d 100644 --- a/integrations/org_test.go +++ b/integrations/org_test.go @@ -92,6 +92,15 @@ func TestPrivateOrg(t *testing.T) { req = NewRequest(t, "GET", "/privated_org/private_repo_on_private_org") session.MakeRequest(t, req, http.StatusNotFound) + // non-org member who is collaborator on repo in private org + session = loginUser(t, "user4") + req = NewRequest(t, "GET", "/privated_org") + session.MakeRequest(t, req, http.StatusNotFound) + req = NewRequest(t, "GET", "/privated_org/public_repo_on_private_org") // colab of this repo + session.MakeRequest(t, req, http.StatusOK) + req = NewRequest(t, "GET", "/privated_org/private_repo_on_private_org") + session.MakeRequest(t, req, http.StatusNotFound) + // site admin session = loginUser(t, "user1") req = NewRequest(t, "GET", "/privated_org") |