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

✨ [WIP] Add isVerifiedGovEmployee to frontend auth context #12362

Open
2 tasks
tristan-orourke opened this issue Dec 19, 2024 · 0 comments
Open
2 tasks

✨ [WIP] Add isVerifiedGovEmployee to frontend auth context #12362

tristan-orourke opened this issue Dec 19, 2024 · 0 comments
Labels
feature New feature or request.

Comments

@tristan-orourke
Copy link
Member

tristan-orourke commented Dec 19, 2024

✨ Feature

We want an easy way to check if user is a verified gov employee, to gate access to certain pages or turn on/reveal certain tools.

🕵️ Details

User is a verified gov employee if user.isGovEmployee == true and user.work_email_verified_at !== null

🎨 Design

📸 Screenshot

🙋‍♀️ Proposed Implementation

This would involve more fields to the UserAuthInfo type to do elegantly.
Can create an accessor in the User Laravel model, which computes isVerifiedGovEmployee based on user.isGovEmployee == true and user.work_email_verified_at !== null. Include this as a new field in UserAuthInfo. Query this and and store it in client-side auth context.

Important

NOTE: Any mutation which can cause isGovEmployee or work_email_verified_at to change, should tell URQL that this field is possibly stale.
This will probably force the whole app to re-render 😬
Can this be enforced in URQL middleware?

🌎 Localization

✅ Acceptance Criteria

  • Criteria 1
  • Criteria 2

🛑 Blockers

Blocked By

Preview Give feedback
No tasks being tracked yet.
@tristan-orourke tristan-orourke added the feature New feature or request. label Dec 19, 2024
@tristan-orourke tristan-orourke added this to the Employee Profile milestone Dec 19, 2024
@tristan-orourke tristan-orourke moved this to 🧊 Icebox in GC Digital Talent Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request.
Projects
Status: 🧊 Icebox
Development

No branches or pull requests

1 participant