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

Unify Permissions across project using validation functions for consistency #262

Open
theGaryLarson opened this issue Jan 8, 2025 · 0 comments

Comments

@theGaryLarson
Copy link
Collaborator

theGaryLarson commented Jan 8, 2025

Create functions to check roles and approval (i.e. isApprovedCompany, isApprovedEmployer). Let's include this in a file called role-management.ts stored in app/lib

non-exhaustive examples:

  • isAdmin()
  • isApprovedEmployer()
  • isJobseeker()
  • isApprovedEducator()

import auth into validation functions to read session info.

We do not want to move permissions inside of server functions because we want to keep permissions decoupled from the function for reuse in other instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📝 Backlog
Development

No branches or pull requests

1 participant