Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow collaborators to view repo owned by private org (#6965) #6968

Merged
merged 2 commits into from May 16, 2019

Conversation

@mrsdizzie
Copy link
Contributor

commented May 16, 2019

Backport of #6965

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

@techknowlogick techknowlogick added this to the 1.8.2 milestone May 16, 2019

@zeripath

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

hi @mrsdizzie:

So it looks like this fails due integration test failures at TestPrivateOrg :

2019/05/16 16:52:24 [.../gitea/models/org.go:314 IsOrganizationOwner()] [E] Organization does not have owner team: 23
--
2581 | [Macaron] 2019-05-16 16:52:24: Completed GET /privated_org 404 Not Found in 2.22759ms
2582 | [Macaron] 2019-05-16 16:52:24: Started GET /privated_org/public_repo_on_private_org for
2583 | [Macaron] 2019-05-16 16:52:24: Completed GET /privated_org/public_repo_on_private_org 404 Not Found in 6.448651ms
2584 | [Macaron] 2019-05-16 16:52:24: Started GET /privated_org/private_repo_on_private_org for
2585 | [Macaron] 2019-05-16 16:52:24: Completed GET /privated_org/private_repo_on_private_org 404 Not Found in 7.644414ms
2586 | [Macaron] 2019-05-16 16:52:24: Started GET /privated_org for
2587 | [Macaron] 2019-05-16 16:52:24: Completed GET /privated_org 200 OK in 8.671479ms
2588 | [Macaron] 2019-05-16 16:52:24: Started GET /privated_org/public_repo_on_private_org for
2589 | [Macaron] 2019-05-16 16:52:24: Completed GET /privated_org/public_repo_on_private_org 200 OK in 47.344727ms
2590 | [Macaron] 2019-05-16 16:52:24: Started GET /privated_org/private_repo_on_private_org for
2591 | [Macaron] 2019-05-16 16:52:24: Completed GET /privated_org/private_repo_on_private_org 200 OK in 25.602935ms
2592 | --- FAIL: TestPrivateOrg (0.21s)
2593 | assertions.go:247: Error Trace:	integration_test.go:333
2594 | integration_test.go:202
2595 | org_test.go:100
2596 | Error: Not equal:
2597 | expected: 200
2598 | actual : 404
2599 | Test: TestPrivateOrg
2600 | Messages: Request: GET /privated_org/public_repo_on_private_org

@GiteaBot GiteaBot added lgtm/need 1 and removed lgtm/need 2 labels May 16, 2019

@mrsdizzie

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2019

@zeripath ah it looks like the fixtures are different between branches (!)

master:
https://github.com/go-gitea/gitea/blob/master/models/fixtures/repository.yml

release/v1.8
https://github.com/go-gitea/gitea/blob/release/v1.8/models/fixtures/repository.yml

fixed test to work as expected on release/v1.8 thanks!

@GiteaBot GiteaBot added lgtm/done and removed lgtm/need 1 labels May 16, 2019

@techknowlogick techknowlogick merged commit 2198396 into go-gitea:release/v1.8 May 16, 2019

2 checks passed

approvals/lgtm this commit looks good
continuous-integration/drone/pr Build is passing
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.