mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-09-13 10:49:21 +00:00
🐛 fix: harden backend authorization and sync
This commit is contained in:
@@ -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 };
|
||||
};
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user