mirror of
https://github.com/freedbygrace/ActiveDirectoryManager.git
synced 2026-08-13 04:08:34 +00:00
Update API documentation and UI to improve clarity and add role-based access control.
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/994ee92d-6a6d-4ca4-99c0-fe0dbc7f160b.jpg
This commit is contained in:
@@ -42,6 +42,8 @@ const registerSchema = insertUserSchema.extend({
|
||||
acceptTerms: z.boolean().refine(val => val === true, {
|
||||
message: "You must accept the terms and conditions",
|
||||
}),
|
||||
// Define roleId explicitly to match form values
|
||||
roleId: z.number().optional().nullable(),
|
||||
}).refine(data => data.password === data.confirmPassword, {
|
||||
message: "Passwords do not match",
|
||||
path: ["confirmPassword"],
|
||||
@@ -140,7 +142,7 @@ export default function AuthPage() {
|
||||
email: "",
|
||||
fullName: "",
|
||||
acceptTerms: false,
|
||||
role: "user",
|
||||
roleId: 2, // Assign the default "user" role ID
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user