diff --git a/apps/dokploy/server/api/routers/admin.ts b/apps/dokploy/server/api/routers/admin.ts index d910f2230..6029c7136 100644 --- a/apps/dokploy/server/api/routers/admin.ts +++ b/apps/dokploy/server/api/routers/admin.ts @@ -31,6 +31,12 @@ export const adminRouter = createTRPCRouter({ update: adminProcedure .input(apiUpdateAdmin) .mutation(async ({ input, ctx }) => { + if (ctx.user.rol === "user") { + throw new TRPCError({ + code: "UNAUTHORIZED", + message: "You are not allowed to update this admin", + }); + } const { authId } = await findAdminById(ctx.user.adminId); return updateAdmin(authId, input); }), diff --git a/apps/dokploy/server/api/routers/server.ts b/apps/dokploy/server/api/routers/server.ts index 97746131c..0d4ef87f3 100644 --- a/apps/dokploy/server/api/routers/server.ts +++ b/apps/dokploy/server/api/routers/server.ts @@ -183,6 +183,9 @@ export const serverRouter = createTRPCRouter({ } }), publicIp: protectedProcedure.query(async ({ ctx }) => { + if (IS_CLOUD) { + return ""; + } const ip = await getPublicIpWithFallback(); return ip; }),