|
|
|
@@ -270,7 +270,10 @@ export default async function middleware( |
|
|
|
GENERATE_FINANCIAL_STATUS_REPORT, |
|
|
|
GENERATE_PROJECT_CASH_FLOW_REPORT, |
|
|
|
GENERATE_STAFF_MONTHLY_WORK_HOURS_ANALYSIS_REPORT, |
|
|
|
GENERATE_CROSS_TEAM_CHARGE_REPORT |
|
|
|
GENERATE_CROSS_TEAM_CHARGE_REPORT, |
|
|
|
G_PROJ_MANHOUR_SUMMARY_MONTHLY_REPORT, |
|
|
|
G_PROJ_MANHOUR_SUMMARY_DAILY_REPORT, |
|
|
|
GENERATE_LAST_MODIFIED_REPORT, |
|
|
|
].some((ability) => abilities.includes(ability)); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -314,6 +317,18 @@ export default async function middleware( |
|
|
|
isAuth = [GENERATE_CROSS_TEAM_CHARGE_REPORT].some((ability) => abilities.includes(ability)); |
|
|
|
} |
|
|
|
|
|
|
|
if (req.nextUrl.pathname.startsWith('/analytics/ProjectManhourSummaryReport')) { |
|
|
|
isAuth = [G_PROJ_MANHOUR_SUMMARY_MONTHLY_REPORT].some((ability) => abilities.includes(ability)); |
|
|
|
} |
|
|
|
|
|
|
|
if (req.nextUrl.pathname.startsWith('/analytics/ProjectMonthlyReport')) { |
|
|
|
isAuth = [G_PROJ_MANHOUR_SUMMARY_DAILY_REPORT].some((ability) => abilities.includes(ability)); |
|
|
|
} |
|
|
|
|
|
|
|
if (req.nextUrl.pathname.startsWith('/analytics/LastModifiedReport')) { |
|
|
|
isAuth = [GENERATE_LAST_MODIFIED_REPORT].some((ability) => abilities.includes(ability)); |
|
|
|
} |
|
|
|
|
|
|
|
if (req.nextUrl.pathname.startsWith('/settings/staff/edit')) { |
|
|
|
isAuth = [VIEW_STAFF_PROFILE].some((ability) => abilities.includes(ability)); |
|
|
|
} |
|
|
|
|