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

Fixes #6881 - API users search fix #6882

Merged
merged 2 commits into from May 8, 2019

Conversation

5 participants
@richmahn
Copy link
Contributor

commented May 8, 2019

Fixes #6881

Fixes the user search if not using auth. No login/user should be needed for user search. Adds integration tests to make sure logged in, logged in as admin, and not logged in all work, where the former shows emails unless queried user has made their email private, the 2nd shows all emails, latter shows no emails.

Also set in admin API.

Test using the swagger page.

@GiteaBot GiteaBot added the lgtm/need 1 label May 8, 2019

@lafriks

lafriks approved these changes May 8, 2019

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

@lafriks

This comment has been minimized.

Copy link
Member

commented May 8, 2019

Great, thanks for adding tests! 🎉

@codecov-io

This comment has been minimized.

Copy link

commented May 8, 2019

Codecov Report

Merging #6882 into master will increase coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6882      +/-   ##
==========================================
+ Coverage   41.33%   41.41%   +0.08%     
==========================================
  Files         432      432              
  Lines       59552    59552              
==========================================
+ Hits        24613    24666      +53     
+ Misses      31701    31646      -55     
- Partials     3238     3240       +2
Impacted Files Coverage Δ
routers/api/v1/user/user.go 62.99% <100%> (+37.79%) ⬆️
routers/api/v1/admin/user.go 29.24% <100%> (ø) ⬆️
modules/log/event.go 65.98% <0%> (+1.52%) ⬆️
models/unit.go 67.56% <0%> (+5.4%) ⬆️

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 d8b2ed6...452d490. Read the comment docs.

@lafriks lafriks merged commit 6db3dc7 into go-gitea:master May 8, 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 May 8, 2019

Please send backport

richmahn added a commit to richmahn/gitea that referenced this pull request May 9, 2019

richmahn added a commit to richmahn/gitea that referenced this pull request May 9, 2019

lunny added a commit that referenced this pull request May 9, 2019

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.