mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-16 19:35:25 +02:00
refactor(tags): update permission checks for tag access
- Replaced role-based access control with permission-based checks for tag visibility in the side menu. - Updated API route handlers to utilize protected procedures for tag queries, enhancing security and consistency in permission management.
This commit is contained in:
@@ -47,7 +47,7 @@ export const tagRouter = createTRPCRouter({
|
||||
}
|
||||
}),
|
||||
|
||||
all: withPermission("tag", "read").query(async ({ ctx }) => {
|
||||
all: protectedProcedure.query(async ({ ctx }) => {
|
||||
try {
|
||||
const organizationTags = await db.query.tags.findMany({
|
||||
where: eq(tags.organizationId, ctx.session.activeOrganizationId),
|
||||
@@ -64,7 +64,7 @@ export const tagRouter = createTRPCRouter({
|
||||
}
|
||||
}),
|
||||
|
||||
one: withPermission("tag", "read")
|
||||
one: protectedProcedure
|
||||
.input(apiFindOneTag)
|
||||
.query(async ({ input, ctx }) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user