-
Notifications
You must be signed in to change notification settings - Fork 0
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
add employee field throughout files #267
add employee field throughout files #267
Conversation
Co-authored-by: Gayatri Kondabathini <Gayatri-K26@users.noreply.github.com>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 🚀
Would using some form of scopes be more flexible? |
What would this look like? Many different roles, or defining what a user has access to? |
Defining what a user has access to; would also make it easy to extend to roles in the future. |
|
||
@ApiProperty() | ||
signatureLink: string; | ||
scope: EmployeeScope; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also add the enum param on the api property?
@ApiProperty({enum: EmployeeScope})
or something similar?
this will also change the type that the auto-generated client has as well
Co-authored-by: Gayatri Kondabathini <Gayatri-K26@users.noreply.github.com>
…//github.com/sandboxnu/mfa-form-automator into 238-feature-create-admin-field-for-employees
apps/server/prisma/schema.prisma
Outdated
@@ -39,7 +44,7 @@ model Employee { | |||
lastName String @db.VarChar(255) | |||
email String @unique @db.VarChar(255) | |||
signatureLink String @db.VarChar(255) | |||
isAdmin Boolean @default(false) @db.Boolean | |||
scope EmployeeScope @default(BASE_USER) // TODO @db tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is does TODO mean, we should have a @db tag here right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description
Added a scope field to Employee schema, dto, and Employee service. Also changed the signature of complete registration. Right now assigns default of base user, but we can add in the ability for users to choose this when they register or pull it from their account.
Motivation and Context
To allow for differentiation between admin and normal user functionality to be implemented.
Closes [#238 ]
How has this been tested?
The site was able to compile and run after the changes we made.
Screenshots (if appropriate):
Types of changes
Checklist: