-
Notifications
You must be signed in to change notification settings - Fork 1
CASL part 1 #189
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
base: main
Are you sure you want to change the base?
CASL part 1 #189
Conversation
| phoneNumber!: string; | ||
|
|
||
| @ManyToOne(() => OrganizationEntity) | ||
| @ManyToOne(() => OrganizationEntity, { joinColumn: "organizationId" }) |
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.
We make sure the organizationId exists, and is the same name as the DTO property, so this can be used in CASL rules.
| }, | ||
| }); | ||
| return <div>{(users?.users ?? []).map((x) => UserRow({ user: x }))}</div>; | ||
| return <div>{users.users.map((x) => UserRow({ user: x }))}</div>; |
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.
Fix an eslint warning I didn't get when landing the search fix.
|
This is ready for review! Start here. |
d8bcbc2 to
728a2a9
Compare
This implements CASL authorization, but doesn't use it, or integrate it at the db level.
The framework for using it with mikroORM is landed, but only used in a test showing off roughly how it works.
Followup patches will integrate this into our repository and baseentitiy classes, and ensure this is used by our services.