mirror of
https://github.com/open-reception/appointment-booking-software.git
synced 2026-08-17 21:25:52 +02:00
Set access-granted for global admin.
This commit is contained in:
@@ -28,6 +28,11 @@ const userCreationSchema = z.object({
|
||||
token: z.uuidv7().optional(),
|
||||
tokenValidUntil: z.date().optional(),
|
||||
language: z.enum(["de", "en"]).optional().default("de"),
|
||||
confirmationState: z
|
||||
.enum(["INVITED", "CONFIRMED", "ACCESS_GRANTED"])
|
||||
.optional()
|
||||
.default("INVITED"),
|
||||
// Note: passphraseHash and recoveryPassphrase are handled internally, not via user input
|
||||
});
|
||||
|
||||
type UserCreation = z.infer<typeof userCreationSchema>;
|
||||
|
||||
@@ -150,6 +150,7 @@ export const POST: RequestHandler = async ({ request, cookies, url }) => {
|
||||
passphrase: body.passphrase, // Will be undefined if passkey is used
|
||||
language: body.language || "de",
|
||||
role: "GLOBAL_ADMIN",
|
||||
confirmationState: "ACCESS_GRANTED", // Admin account is active immediately
|
||||
},
|
||||
url,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user