Skip to content

Conversation

@tdresser
Copy link
Collaborator

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.

phoneNumber!: string;

@ManyToOne(() => OrganizationEntity)
@ManyToOne(() => OrganizationEntity, { joinColumn: "organizationId" })
Copy link
Collaborator Author

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>;
Copy link
Collaborator Author

@tdresser tdresser Aug 11, 2025

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.

@tdresser tdresser requested a review from IanEdington August 11, 2025 20:05
@tdresser
Copy link
Collaborator Author

This is ready for review!

Start here.

@tdresser tdresser force-pushed the casl branch 6 times, most recently from d8bcbc2 to 728a2a9 Compare September 4, 2025 16:52
Base automatically changed from user_active_organization to main September 6, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants