chaynHQ/bloom-frontend

Only redirect if a partner admin is active

Closed this issue · 4 comments

Overview

At Bloom, we have partners who have a specific version of Bloom. These partners have administrators who give out access codes to users. These administrators are called partnerAdmins. If on the user state, the user.partnerAdmin is not null, this user is a partnerAdmin. These administrators predominantly use the /partner-admin/create-access-code page. Therefore when one of these administrators log in we redirect them straight to that page.
In pages/auth/login.tsx, if a user is a partner admin we redirect them to /partner-admin/create-access-code. We not only need to check if the partner admin exists, we need to check if the partnerAdmin is still active. We can do this by checking partnerAdmin.active instead on line 86.

Action Items

  • Update the check on line 86 from if (partnerAdmin?.id) to if (partnerAdmin?.active)
  • Run Cypress tests to ensure everything is still working
  • Create a PR and tag @kyleecodes

@eleanorreem can you assign me this issue?

Hi there ! I am a new contributor to this repository and would love to contribute by solving this issue. Could you please assign this issue to me ?

Hi there ! I am a new contributor to this repository and would love to contribute by solving this issue. Could you please assign this issue to me ?

Thank you for your interest @AhmedFaizanDev! Issues are assigned to those who ask first. Please check out other issues and stay tuned as we publish more!

Thank you @nipunh you have been assigned this issue!
Please follow the directions in our Contributing Guide. We look forward to reviewing your pull request shortly ✨


Support Chayn's mission? ⭐ Please star this repo to help us find more contributors like you!
Learn more about Chayn here and explore our projects. 🌸