feat(auth): enhance authentication system with multi-user support and admin role management
- Implemented multi-user authentication with role-based access control. - Added environment variables for initial admin user setup. - Updated README and example environment file with new authentication options. - Introduced user and system configuration models in the database schema. - Enhanced authentication middleware to support user registration and role management. - Updated frontend to handle new authentication flows, including admin user creation and role updates.
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
API_URL,
|
||||
createDrawing,
|
||||
deleteDrawing,
|
||||
ensureAuthenticated,
|
||||
getCsrfHeaders,
|
||||
getDrawing,
|
||||
} from "./helpers/api";
|
||||
@@ -199,6 +200,7 @@ test.describe("Security - Malicious Content Blocking", () => {
|
||||
},
|
||||
};
|
||||
|
||||
await ensureAuthenticated(request);
|
||||
const response = await request.post(`${API_URL}/drawings`, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -225,6 +227,7 @@ test.describe("Security - Malicious Content Blocking", () => {
|
||||
expect(savedFiles["malicious-image"].dataURL).not.toContain("javascript:");
|
||||
|
||||
// Cleanup
|
||||
await ensureAuthenticated(request);
|
||||
await request.delete(`${API_URL}/drawings/${drawing.id}`, {
|
||||
headers: await getCsrfHeaders(request),
|
||||
});
|
||||
@@ -240,6 +243,7 @@ test.describe("Security - Malicious Content Blocking", () => {
|
||||
},
|
||||
};
|
||||
|
||||
await ensureAuthenticated(request);
|
||||
const response = await request.post(`${API_URL}/drawings`, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -266,6 +270,7 @@ test.describe("Security - Malicious Content Blocking", () => {
|
||||
expect(savedFiles["malicious-image"].dataURL).not.toContain("<script>");
|
||||
|
||||
// Cleanup
|
||||
await ensureAuthenticated(request);
|
||||
await request.delete(`${API_URL}/drawings/${drawing.id}`, {
|
||||
headers: await getCsrfHeaders(request),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user