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

Open
wants to merge 40 commits into
base: master
Choose a base branch
from

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 44.91525% with 65 lines in your changes missing coverage. Please review.

Project coverage is 73.21%. Comparing base (5786896) to head (c94a135).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #6966       +/-   ##
===========================================
- Coverage   86.99%   73.21%   -13.78%     
===========================================
  Files        1621     1408      -213     
  Lines       63937    56137     -7800     
  Branches     2033     1033     -1000     
===========================================
- Hits        55623    41103    -14520     
- Misses       7980    14881     +6901     
+ Partials      334      153      -181     
Flag Coverage Δ
integrationtests 48.72% <28.73%> (-15.83%) ⬇️
unittests 73.18% <44.91%> (-11.82%) ⬇️
Components Coverage Δ
api 76.84% <ø> (ø)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 91.46% <96.00%> (+<0.01%) ⬆️
pkg_notifications_library 76.16% <ø> (-8.42%) ⬇️
pkg_postgres_database 87.89% <50.00%> (-0.37%) ⬇️
pkg_service_integration 70.02% <ø> (ø)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 65.64% <ø> (-19.75%) ⬇️
agent 96.82% <ø> (ø)
api_server 88.40% <ø> (-1.73%) ⬇️
autoscaling 96.09% <ø> (ø)
catalog 62.15% <ø> (-28.42%) ⬇️
clusters_keeper 99.48% <ø> (ø)
dask_sidecar 91.26% <ø> (ø)
datcore_adapter 93.18% <ø> (ø)
director 76.40% <ø> (-0.09%) ⬇️
director_v2 72.44% <ø> (-18.95%) ⬇️
dynamic_scheduler 97.14% <ø> (ø)
dynamic_sidecar 88.77% <ø> (-0.95%) ⬇️
efs_guardian 84.56% <ø> (-5.57%) ⬇️
invitations 93.44% <ø> (ø)
osparc_gateway_server ∅ <ø> (∅)
payments 77.72% <ø> (-14.94%) ⬇️
resource_usage_tracker 63.75% <ø> (-25.23%) ⬇️
storage 51.90% <ø> (-37.64%) ⬇️
webclient ∅ <ø> (∅)
webserver 58.77% <29.88%> (-25.67%) ⬇️

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 5786896...c94a135. 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 from 68f92ae to e4aad80 Compare December 18, 2024 07:59
@pcrespov pcrespov force-pushed the is1779/search-users branch from ae95280 to c94a135 Compare December 18, 2024 12:55
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
4.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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