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

Conversation

@lunny
Copy link
Member

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 kind/bug label Apr 24, 2019

@lunny lunny added this to the 1.9.0 milestone Apr 24, 2019

@lunny lunny force-pushed the lunny:lunny/fix_perm branch from 11edb06 to 7d771e4 Apr 25, 2019

@codecov-io

This comment has been minimized.

Copy link

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.

@techknowlogick techknowlogick changed the title fix org visibility bug Fix org visibility bug when git cloning Apr 25, 2019

@lunny lunny force-pushed the lunny:lunny/fix_perm branch from 3d8c5c3 to 423af2e Apr 25, 2019

@lunny

This comment has been minimized.

Copy link
Member Author

commented Apr 25, 2019

It's ready to review.

@lafriks

This comment has been minimized.

Copy link
Member

commented Apr 25, 2019

Drone fails

lunny added some commits Apr 24, 2019

@lunny lunny force-pushed the lunny:lunny/fix_perm branch from 423af2e to 9cd0f14 Apr 25, 2019

@zeripath
Copy link
Contributor

left a comment

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 added some commits Apr 25, 2019

@lunny

This comment has been minimized.

Copy link
Member Author

commented Apr 25, 2019

@GiteaBot GiteaBot added lgtm/need 1 and removed lgtm/need 2 labels Apr 25, 2019

@GiteaBot GiteaBot added lgtm/done and removed lgtm/need 1 labels Apr 25, 2019

@lafriks lafriks merged commit 199faad into go-gitea:master Apr 25, 2019

2 checks passed

approvals/lgtm this commit looks good
continuous-integration/drone/pr Build is passing
Details
@lafriks

This comment has been minimized.

Copy link
Member

commented Apr 25, 2019

Please backport

@lunny lunny deleted the lunny:lunny/fix_perm branch Apr 26, 2019

lunny added a commit to lunny/gitea that referenced this pull request Apr 26, 2019

Fix org visibility bug when git cloning (go-gitea#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

lafriks added a commit that referenced this pull request Apr 26, 2019

Fix org visibility bug when git cloning (#6743) (#6762)
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.