mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-12 09:47:54 +02:00
Improve access for director role to calendar features in production
Add permission checks to /api/orders and /api/deliveries routes and create a diagnostic script to debug production calendar access issues for the director role. Replit-Commit-Author: Agent Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/lOTIEjy
This commit is contained in:
1 parent
c1718f2f1f
commit
55b3aaa9e1
4 files changed
+222
-2
No files matched your search
+2
-2
@@ -311,7 +311,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
});
|
||||
|
||||
// Orders routes
|
||||
app.get('/api/orders', isAuthenticated, async (req: any, res) => {
|
||||
app.get('/api/orders', isAuthenticated, requirePermission('orders', 'view'), async (req: any, res) => {
|
||||
try {
|
||||
const user = await storage.getUserWithGroups(req.user.claims ? req.user.claims.sub : req.user.id);
|
||||
if (!user) {
|
||||
@@ -584,7 +584,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
});
|
||||
|
||||
// Deliveries routes
|
||||
app.get('/api/deliveries', isAuthenticated, async (req: any, res) => {
|
||||
app.get('/api/deliveries', isAuthenticated, requirePermission('deliveries', 'view'), async (req: any, res) => {
|
||||
try {
|
||||
const user = await storage.getUserWithGroups(req.user.claims ? req.user.claims.sub : req.user.id);
|
||||
if (!user) {
|
||||
|
||||
Reference in new issue
Block a user