Skip to content

Reduce Staff Permissions #162

@naasanov

Description

@naasanov

Motivation

Staff should only be able to view data, with the exception of checking the "is registered" checkbox on the student table

Deliverables

  • Add a role field to Session, User, and JWT in next-auth.d.ts
  • In the staff view, conditionally render relevant components depending on whether the user is admin or staff
    • This includes
      • the Row Options column (edit and delete)
      • the Create New resource button
    • Use NextAuth's useSession hook to extract role information from the authentication context
  • Add a button on the staff view that switches the current user between staff and admin for debugging

Important Notes

  • There is no implemented NextAuth authentication, so no data is properly loaded into the session. You should find a temporary workaround for this that should be easily hotswappable once authentication is implemented

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions