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 access issues on milestone and issue overview pages. #9603

Merged

Conversation

@davidsvantesson
Copy link
Contributor

davidsvantesson commented Jan 4, 2020

  • Fix issue with milestone overview page where it includes repositories that user doesn't have access to the unit enabled
  • Fix too many organization repositories included on overview pages. Access must take both unit availability and user access into account, therefore I unfortunately don't see it possible to do in one db query.
rIDint64, err := strconv.ParseInt(rID, 10, 64)
if err == nil && com.IsSliceContainsInt64(userRepoIDs, rIDint64) {
repoIDs = append(repoIDs, rIDint64)
if len(reposQuery) != 0 {

This comment has been minimized.

Copy link
@guillep2k

guillep2k Jan 5, 2020

Member

This replaces #9591

This comment has been minimized.

Copy link
@davidsvantesson

davidsvantesson Jan 5, 2020

Author Contributor

#9591 fixed it for issue page, this fixes it for milestone page. Also I changed log to Warn, IMO for something that user can put into address field that is enough.

@GiteaBot GiteaBot added the lgtm/need 1 label Jan 5, 2020
@GiteaBot GiteaBot added lgtm/done and removed lgtm/need 1 labels Jan 5, 2020
@techknowlogick techknowlogick added this to the 1.11.0 milestone Jan 5, 2020
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 5, 2020

Codecov Report

Merging #9603 into master will decrease coverage by 0.02%.
The diff coverage is 59.32%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9603      +/-   ##
==========================================
- Coverage    42.2%   42.18%   -0.03%     
==========================================
  Files         578      578              
  Lines       76058    76065       +7     
==========================================
- Hits        32103    32086      -17     
- Misses      39977    39998      +21     
- Partials     3978     3981       +3
Impacted Files Coverage Δ
routers/user/home.go 56.57% <57.14%> (-0.36%) ⬇️
models/repo_permission.go 72.8% <62.5%> (-0.71%) ⬇️
models/user.go 50.77% <62.5%> (-0.26%) ⬇️
modules/task/migrate.go 25% <0%> (-6.58%) ⬇️
modules/process/manager.go 74.69% <0%> (-3.62%) ⬇️
models/error.go 32.71% <0%> (-1.11%) ⬇️
modules/migrations/gitea.go 9.66% <0%> (-0.85%) ⬇️
models/repo.go 47.97% <0%> (-0.11%) ⬇️
services/pull/temp_repo.go 34.18% <0%> (+2.56%) ⬆️

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 8b24073...b16decc. Read the comment docs.

@techknowlogick techknowlogick merged commit 03d59bc into go-gitea:master Jan 5, 2020
2 checks passed
2 checks passed
approvals/lgtm this commit looks good
continuous-integration/drone/pr Build is passing
Details
@davidsvantesson davidsvantesson deleted the davidsvantesson:fix-milestone-overview branch Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.