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
Member

Backport of #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 go-gitea#6962
@techknowlogick techknowlogick added this to the 1.8.2 milestone May 16, 2019
@zeripath
Copy link
Contributor

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 the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 16, 2019
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 16, 2019
@mrsdizzie
Copy link
Member Author

@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 This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 16, 2019
@techknowlogick techknowlogick merged commit 2198396 into go-gitea:release/v1.8 May 16, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants