diff --git a/attached_assets/{B140BADE-D8C9-4DA2-92B3-E3E4AE043049}_1755007441143.png b/attached_assets/{B140BADE-D8C9-4DA2-92B3-E3E4AE043049}_1755007441143.png new file mode 100644 index 0000000..9eb1de0 Binary files /dev/null and b/attached_assets/{B140BADE-D8C9-4DA2-92B3-E3E4AE043049}_1755007441143.png differ diff --git a/server/routes.ts b/server/routes.ts index 8f32730..179b48b 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -1952,13 +1952,8 @@ RÉSUMÉ DU SCAN const data = insertCustomerOrderSchema.parse(req.body); console.log("Parsed data:", data); - // Check if user has access to the specified group - if (user.role !== 'admin') { - const userGroupIds = user.userGroups?.map((ug: any) => ug.groupId) || []; - if (!userGroupIds.includes(data.groupId)) { - return res.status(403).json({ message: "Access denied to this group" }); - } - } + // REMOVED: All role restrictions - tous les rôles peuvent créer des commandes client + console.log("Creating customer order - no role restrictions:", { userId, userRole: user.role, groupId: data.groupId }); const customerOrder = await storage.createCustomerOrder({ ...data,