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

Update: User Registration Redirect Path #1290

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Gabe-Torres
Copy link
Contributor

🔗 Issue

#1227

✍️ Description

This update utilizes Devise's after_update_path_for method to handle user redirection after updating their registration.

If the user is part of the staff roster, associated with a valid organization, and authorized to access the organization's dashboard, they will be redirected to their staff dashboard.

If the user is an adopter or fosterer and authorized to access the adopter/foster dashboard, they will be redirected there.

If neither condition is met, the user will be redirected to the root path.

Adds: Controller tests for user registration updates: Test case for adopter/fosterer user redirection.
Test case for staff user redirection.

📷 Screenshots/Demos

(https://jam.dev/c/62b85dbb-12bc-4248-b63d-936d9f562b16)

This update utilizes Devise's after_update_path_for method to handle user
redirection after updating their registration.

If the user is part of the staff roster, associated with a valid organization,
and authorized to access the organization's dashboard, they will be redirected to their staff dashboard.

If the user is an adopter or fosterer and authorized to access the adopter/foster dashboard,
they will be redirected there.

If neither condition is met, the user will be redirected to the root path.

Adds: Controller tests for user registration updates:
Test case for adopter/fosterer user redirection.
Test case for staff user redirection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant