Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Jul 1, 2025

What do these changes do?

This PR introduces two key changes to the account request flow:

  1. ✨ When a user submits a "Request Account" form (request_product_account), support is notified via email (as before), and a new pre-registration entry is created in the database. This entry is visible to the PO in the PO Center.
  2. ✨ When a PO reviews and approves a request (approve_user_account), an invitation link is generated and stored in the pre-registration entry’s extra info. A notification email to the user with this link will be added in a future iteration.

Additionally, the implementation handles error cases such as duplicate pre-registrations (already approved or denied).

Details

  • rest.preregistartion.request_product_account handler
    • uses _preregistration_service.create_pre_registration
      • users_service.pre_register_user
  • ♻️ login domain
    • _rest_exceptions: Adds exception handlers to map cases like AlreadyPreRegisteredError to 409

Follow up changes

Related issue/s

How to test

cd services/web/server
make install-dev
pytet -vv tests/unit/with_dbs/03/login/test_login_preregistration.py

Dev-ops

None

@codecov
Copy link

codecov bot commented Jul 1, 2025

Codecov Report

Attention: Patch coverage is 91.22807% with 5 lines in your changes missing coverage. Please review.

Project coverage is 89.65%. Comparing base (04ffd16) to head (e23592f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8026      +/-   ##
==========================================
+ Coverage   87.89%   89.65%   +1.75%     
==========================================
  Files        1853     1457     -396     
  Lines       71495    60125   -11370     
  Branches     1258      477     -781     
==========================================
- Hits        62843    53907    -8936     
+ Misses       8288     6097    -2191     
+ Partials      364      121     -243     
Flag Coverage Δ
integrationtests 64.20% <53.57%> (-0.01%) ⬇️
unittests 88.04% <91.22%> (+1.50%) ⬆️
Components Coverage Δ
api 76.84% <ø> (ø)
pkg_aws_library ∅ <ø> (∅)
pkg_celery_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 93.27% <100.00%> (+<0.01%) ⬆️
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration 69.92% <ø> (ø)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.10% <ø> (+0.05%) ⬆️
agent 96.29% <ø> (ø)
api_server 92.64% <ø> (ø)
autoscaling 96.03% <ø> (ø)
catalog 92.21% <ø> (ø)
clusters_keeper 99.13% <ø> (ø)
dask_sidecar 91.79% <ø> (-0.57%) ⬇️
datcore_adapter 97.94% <ø> (ø)
director 76.82% <ø> (+0.09%) ⬆️
director_v2 91.02% <ø> (+0.01%) ⬆️
dynamic_scheduler 96.69% <ø> (ø)
dynamic_sidecar 90.09% <ø> (ø)
efs_guardian 89.65% <ø> (ø)
invitations 93.60% <ø> (ø)
payments 92.57% <ø> (ø)
resource_usage_tracker 88.89% <ø> (-0.22%) ⬇️
storage 86.36% <ø> (+0.08%) ⬆️
webclient ∅ <ø> (∅)
webserver 87.72% <91.07%> (+0.01%) ⬆️

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 04ffd16...e23592f. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pcrespov pcrespov self-assigned this Jul 1, 2025
@pcrespov pcrespov added this to the Engage milestone Jul 1, 2025
@pcrespov pcrespov added the a:webserver webserver's codebase. Assigning the area is particularly useful for bugs label Jul 1, 2025
@pcrespov pcrespov force-pushed the is23/registration-workflow branch from 50f71a5 to f94412e Compare July 1, 2025 14:48
@pcrespov pcrespov changed the title WIP: Is23/registration workflow ✨ Enhance Account Request Flow with Pre-Registration and PO Approval Handling Jul 4, 2025
@pcrespov pcrespov marked this pull request as ready for review July 4, 2025 09:22
@pcrespov
Copy link
Member Author

pcrespov commented Jul 4, 2025

@mergify queue

@pcrespov pcrespov enabled auto-merge (squash) July 4, 2025 09:47
@pcrespov pcrespov added the 🤖-automerge marks PR as ready to be merged for Mergify label Jul 4, 2025
@mergify
Copy link
Contributor

mergify bot commented Jul 4, 2025

queue

🟠 Waiting for conditions to match

  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed
  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=0
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • #review-threads-unresolved=0
      • -conflict
      • -draft
      • base=master
      • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
      • label!=🤖-do-not-merge
      • label=🤖-automerge
      • any of: [🛡 GitHub branch protection]
        • check-skipped = deploy to dockerhub
        • check-neutral = deploy to dockerhub
        • check-success = deploy to dockerhub
      • any of: [🛡 GitHub branch protection]
        • check-success = system-tests
        • check-neutral = system-tests
        • check-skipped = system-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = unit-tests
        • check-neutral = unit-tests
        • check-skipped = unit-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = check OAS' are up to date
        • check-neutral = check OAS' are up to date
        • check-skipped = check OAS' are up to date
      • any of: [🛡 GitHub branch protection]
        • check-success = integration-tests
        • check-neutral = integration-tests
        • check-skipped = integration-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = build-test-images (frontend) / build-test-images
        • check-neutral = build-test-images (frontend) / build-test-images
        • check-skipped = build-test-images (frontend) / build-test-images

Copy link
Collaborator

@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!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 4, 2025

@pcrespov pcrespov merged commit f47c538 into ITISFoundation:master Jul 4, 2025
95 of 97 checks passed
@pcrespov pcrespov deleted the is23/registration-workflow branch July 4, 2025 16:12
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify a:webserver webserver's codebase. Assigning the area is particularly useful for bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove usage of external tool (fogbugz) from workflow

5 participants