mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-07-28 20:38:56 +00:00
Fix: Improved type safety in user role management
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/75cbeba5-9116-4410-bb46-9a7acc4192de.jpg
This commit is contained in:
@@ -76,7 +76,7 @@ const userFormSchema = z.object({
|
||||
email: z.string().email("Please enter a valid email"),
|
||||
password: z.string().min(8, "Password must be at least 8 characters"),
|
||||
fullName: z.string().optional(),
|
||||
role: z.enum(systemRoles as [string, ...string[]]),
|
||||
role: z.enum(systemRoles as unknown as [string, ...string[]]),
|
||||
organizationId: z.number().optional(),
|
||||
});
|
||||
|
||||
@@ -119,7 +119,7 @@ export default function UsersRolesPage() {
|
||||
// Form for editing a user's role
|
||||
const editRoleForm = useForm<{ role: UserRole }>({
|
||||
resolver: zodResolver(z.object({
|
||||
role: z.enum(systemRoles as [string, ...string[]]),
|
||||
role: z.enum(systemRoles as unknown as [string, ...string[]]),
|
||||
})),
|
||||
defaultValues: {
|
||||
role: "user",
|
||||
|
||||
Reference in New Issue
Block a user