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

Fix org visibility bug when git cloning #6743

Merged
merged 7 commits into from
Apr 25, 2019
Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented Apr 24, 2019

Should fix #6491, but if someone could add some tests are better. I'm so sleepy so have to go to bed now.
Integration tests added.

@lunny lunny added the type/bug label Apr 24, 2019
@lunny lunny added this to the 1.9.0 milestone Apr 24, 2019
@codecov-io
Copy link

codecov-io commented Apr 25, 2019

Codecov Report

Merging #6743 into master will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6743      +/-   ##
==========================================
+ Coverage   40.97%   41.04%   +0.06%     
==========================================
  Files         421      421              
  Lines       57934    57936       +2     
==========================================
+ Hits        23739    23777      +38     
+ Misses      31035    31002      -33     
+ Partials     3160     3157       -3
Impacted Files Coverage Δ
routers/repo/view.go 43.03% <ø> (+1.43%) ⬆️
routers/api/v1/api.go 68.68% <ø> (ø) ⬆️
modules/context/repo.go 57% <ø> (+0.36%) ⬆️
models/org.go 70.72% <100%> (+0.68%) ⬆️
models/user.go 51.15% <100%> (+0.36%) ⬆️
models/repo_permission.go 73.3% <100%> (+0.87%) ⬆️
modules/log/event.go 64.46% <0%> (-1.53%) ⬇️
models/repo.go 47.79% <0%> (-0.18%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8f4c77...6fd3f1f. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 25, 2019
@techknowlogick techknowlogick changed the title fix org visibility bug Fix org visibility bug when git cloning Apr 25, 2019
@lunny
Copy link
Member Author

lunny commented Apr 25, 2019

It's ready to review.

@lafriks
Copy link
Member

lafriks commented Apr 25, 2019

Drone fails

Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use: "anonymous user", or "not logged in user" instead of "unlogin user" in comments.

Change the names of user22 and user23 to limitedorg and privateorg or similar - then it's clear what they are for future tests and makes the tests less confusing.

@lunny
Copy link
Member Author

lunny commented Apr 25, 2019

@lafriks @zeripath done.

@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 Apr 25, 2019
@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 Apr 25, 2019
@lafriks lafriks merged commit 199faad into go-gitea:master Apr 25, 2019
@lafriks
Copy link
Member

lafriks commented Apr 25, 2019

Please backport

@lunny lunny deleted the lunny/fix_perm branch April 26, 2019 00:48
lunny added a commit to lunny/gitea that referenced this pull request Apr 26, 2019
* 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
lafriks pushed a commit that referenced this pull request Apr 26, 2019
* 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
@lafriks lafriks added the backport/done All backports for this PR have been created label Apr 26, 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
backport/done All backports for this PR have been created 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.

Public repositories of a private organization are hidden but can be checked out by anyone
6 participants