🐛 fix: harden backend authorization and sync

This commit is contained in:
2026-08-13 03:29:17 +07:00
parent 4d29156614
commit ab662a4fa4
35 changed files with 442 additions and 176 deletions
+2
View File
@@ -16,6 +16,7 @@ export type K8sResource = {
namespace?: string;
age: string;
labels?: Record<string, string>;
annotations?: Record<string, string>;
[key: string]: unknown;
};
@@ -84,6 +85,7 @@ export type CustomResourceSummary = {
namespace?: string;
age: string;
labels?: Record<string, string>;
annotations?: Record<string, string>;
spec?: Record<string, unknown>;
status?: { phase?: string; [key: string]: unknown };
};
+8 -2
View File
@@ -4,9 +4,15 @@ export type User = PrismaUser;
export type CreateUserInput = Prisma.UserCreateInput;
export type UpdateUserInput = Prisma.UserUpdateInput;
export type UpdateUserInput = {
name?: string;
role?: "admin" | "user";
};
export type UpdateSuspensionInput = Prisma.UserUpdateInput;
export type UpdateSuspensionInput = {
isSuspended: boolean;
suspendedUntil?: Date | null;
};
export function isUserSuspended(user: Pick<PrismaUser, "isSuspended" | "suspendedUntil">): boolean {
if (!user.isSuspended) {