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

✨ Get and search users applying privacy settings 🗃️ #6966

Merged
merged 42 commits into from
Jan 3, 2025

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Dec 13, 2024

What do these changes do?

ReDoc

  • Can search users by partial username , email or first/last_name (if privacy settings allows):
    • POST /users:search with match and limit in request body
    • NOTE: used POST to simplify front-end query
  • Can get a user:
    • by primary_group_id: GET /groups/{primary_group_id}/users
    • by user_id: GET users/{user_id} (wont be used)
  • All users information in the responses are constraint with the user's privacy settings
  • Moved former /users to /admin/users since it was used for admin purposes

Related issue/s

How to test

  • Acceptance test defined in test_get_and_search_public_users

Dev-ops

None

@pcrespov pcrespov self-assigned this Dec 13, 2024
@pcrespov pcrespov added this to the Event Horizon milestone Dec 13, 2024
@pcrespov pcrespov added a:webserver issue related to the webserver service a:api framework api, data schemas, a:models-library labels Dec 13, 2024
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 69.16667% with 37 lines in your changes missing coverage. Please review.

Project coverage is 88.73%. Comparing base (493488c) to head (9b9650d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6966      +/-   ##
==========================================
+ Coverage   87.02%   88.73%   +1.71%     
==========================================
  Files        1621     1407     -214     
  Lines       63993    56174    -7819     
  Branches     2035     1034    -1001     
==========================================
- Hits        55688    49847    -5841     
+ Misses       7972     6152    -1820     
+ Partials      333      175     -158     
Flag Coverage Δ
integrationtests 64.86% <36.78%> (+0.27%) ⬆️
unittests 86.78% <68.33%> (+1.75%) ⬆️
Components Coverage Δ
api 76.84% <ø> (ø)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 91.56% <96.00%> (+<0.01%) ⬆️
pkg_notifications_library 84.57% <ø> (ø)
pkg_postgres_database 88.23% <50.00%> (-0.03%) ⬇️
pkg_service_integration 70.02% <ø> (ø)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.38% <ø> (ø)
agent 96.82% <ø> (ø)
api_server 90.13% <ø> (ø)
autoscaling 96.09% <ø> (ø)
catalog 90.57% <ø> (ø)
clusters_keeper 99.48% <ø> (ø)
dask_sidecar 91.26% <ø> (ø)
datcore_adapter 93.18% <ø> (ø)
director 76.40% <ø> (ø)
director_v2 91.40% <ø> (-0.02%) ⬇️
dynamic_scheduler 97.19% <ø> (ø)
dynamic_sidecar 89.72% <ø> (-0.04%) ⬇️
efs_guardian 90.12% <ø> (ø)
invitations 93.44% <ø> (ø)
osparc_gateway_server ∅ <ø> (∅)
payments 92.66% <ø> (ø)
resource_usage_tracker 89.56% <ø> (ø)
storage 89.54% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 86.12% <63.21%> (+1.69%) ⬆️

Continue to review full report in Codecov by Sentry.

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

@pcrespov pcrespov force-pushed the is1779/search-users branch from 7eaf541 to 031d39d Compare December 16, 2024 21:40
@pcrespov pcrespov changed the title WIP: ✨ Is1779/search users ✨ Get and search users applying privacy settings Dec 17, 2024
@pcrespov pcrespov marked this pull request as ready for review December 17, 2024 10:18
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

Maybe you need to regenerate the openapi specs. as the test is failing

Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

Thanks!

api/specs/web-server/_groups.py Show resolved Hide resolved
Copy link
Member

@odeimaiz odeimaiz left a comment

Choose a reason for hiding this comment

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

👍

@pcrespov pcrespov changed the title ✨ Get and search users applying privacy settings ✨ Get and search users applying privacy settings 🗃️ Dec 17, 2024
@pcrespov pcrespov enabled auto-merge (squash) December 17, 2024 16:06
@pcrespov pcrespov force-pushed the is1779/search-users branch 2 times, most recently from ae95280 to c94a135 Compare December 18, 2024 12:55
@pcrespov pcrespov force-pushed the is1779/search-users branch from c94a135 to 733ecdd Compare January 3, 2025 08:56
Copy link

sonarqubecloud bot commented Jan 3, 2025

@pcrespov pcrespov merged commit 6f0c82c into ITISFoundation:master Jan 3, 2025
86 of 93 checks passed
@pcrespov pcrespov deleted the is1779/search-users branch January 3, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:api framework api, data schemas, a:models-library a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants