feat(access-control): update certificate permissions to include 'update' action

- Modified the access control settings for the 'certificate' resource to allow 'update' permissions for admin and owner roles.
- Updated the certificate router to use the new permission structure for the update mutation.
This commit is contained in:
Mauricio Siu
2026-04-03 22:56:25 -06:00
parent 5c053777c5
commit 092212e225
2 changed files with 4 additions and 4 deletions

View File

@@ -76,7 +76,7 @@ export const certificateRouter = createTRPCRouter({
where: eq(certificates.organizationId, ctx.session.activeOrganizationId),
});
}),
update: adminProcedure
update: withPermission("certificate", "update")
.input(apiUpdateCertificate)
.mutation(async ({ input, ctx }) => {
const certificate = await findCertificateById(input.certificateId);