




================================================================================
MENU ITEMS TO PERMISSIONS AUDIT
================================================================================

📋 MENU ITEMS ANALYSIS
--------------------------------------------------------------------------------

TOP_LEVEL:
  - Dashboard → dashboard
  - DEPARTMENTS → (no URL)
  - TOOLS → (no URL)
  - QUICK LINKS → (no URL)
  - ADMIN → (no URL)
  - APP GRID → (no URL)

DEPARTMENTS:
  - Accounting → #
  - CRM → #
  - Forecaster → (no URL)
  - HR → #
  - Inventory → #
  - Manufacturing → #
  - Purchases → #
  - Sales → #

CRM:
  - Dashboard → crm/dashboard
  - Activities → crm/activities
  - Contacts → crm/contacts
  - Companies → companies
  - Email Marketing → email-marketing
  - Opportunities → crm/opportunities
  - NDAs → ndas
  - Support → #
  - Reports → crm/reports

Support:
  - Tickets → crm/support
  - FAQs → crm/faqs

ADMIN:
  - Announcements → announcements
  - Settings → #

Settings:
  - Administrative → (no URL)
  - Automation → settings/automation
  - Company Settings → #
  - Financial Settings → #
  - Location Settings → #
  - System Configuration → #

Company Settings:
  - Company Info → settings/company
  - Email Settings → settings/email
  - Locations → locations
  - Positions → hr/positions
  - User Groups → settings/user-groups

Financial Settings:
  - Cost Allocation → settings/cost-allocation
  - Fiscal Year → settings/fiscal-year
  - Payment Terms → settings/payment-terms
  - PP&E Parameters → settings/ppe-parameters
  - Tax Settings → settings/tax

Location Settings:
  - Business Parameters → settings/business-parameters
  - Facilities & Leasing → settings/facilities
  - Payroll Settings → settings/payroll

Access & Roles:
  - Audit Log → audit-logs
  - Users → users
  - Roles & Permissions → roles
  - Specific Data Roles → data_access

System Configuration:
  - Action Menu Editor → settings/action-menus
  - Dropdowns → #
  - QuickBooks Mgmt → quickbooks
  - Templates → #

Dropdowns:
  - Operations → settings/dropdowns/operations
  - Sales & CRM → settings/dropdowns/sales

Templates:
  - NDA Templates → settings/nda-templates
  - Terms & Conditions → settings/terms-conditions

Accounting:
  - Dashboard → accounting
  - Assets/Compliance → #
  - Banking/Cash → #
  - Core Accounting → #
  - Multi-Currency → accounting/currency
  - Operations → #
  - Payments → (no URL)
  - Recurring Transactions → /recurring
  - Tax Management → #
  - Reports → #

Core Accounting:
  - Chart of Accounts → accounting/accounts
  - Journal Entries → accounting/journal
  - General Ledger → accounting/ledger

Banking/Cash:
  - Bank Accounts → accounting/bank-accounts
  - Bank Reconciliation → accounting/reconciliation

Operations:
  - Expenses → accounting/expenses
  - Budgets → accounting/budgets

Assets/Compliance:
  - Fixed Assets → accounting/assets
  - Depreciation → accounting/depreciation
  - Period Closing → accounting/period

Reports:
  - All Report Package → accounting/reports/package
  - Balance Sheet → accounting/reports/balance-sheet
  - Income Statement → accounting/reports/income-statement
  - Cash Flow Statement → accounting/reports/cash-flow-statement
  - Trial Balance → accounting/reports/trial-balance
  - Aging Reports → accounting/reports/aging
  - A/P Aging Detail → accounting/reports/ap-aging-detail
  - A/R Aging Detail → accounting/reports/ar-aging-detail
  - Payment Terms List → accounting/reports/payment-terms-list
  - Production Reports → manufacturing/reports/production
  - OEE Reports → manufacturing/reports/oee
  - Report Builder → reports/custom/builder
  - My Reports → reports/custom/my
  - Shared Reports → reports/custom/shared
  - Scheduled Reports → reports/custom/scheduled

HR:
  - Dashboard → hr/dashboard
  - Employees → employees
  - Recruitment → #
  - Development → #
  - Relations → #
  - Attendance → hr/attendance
  - Time Off → hr/timeoff
  - Timesheets → hr/timesheets

Recruitment:
  - Dashboard → hr/recruitment/dashboard
  - Job Positions → hr/recruitment/positions
  - Applications → hr/recruitment/applications
  - Interviews → hr/recruitment/interviews
  - Assessments → hr/recruitment/assessments
  - Offers → hr/recruitment/offers

Development:
  - Contracts → hr/development/contracts
  - Training → hr/development/training
  - Performance Reviews → hr/development/reviews

Relations:
  - Issues & Challenges → hr/relations/issues
  - Separations → hr/relations/separations

Inventory:
  - Dashboard → inventory/dashboard
  - Product Management → #
  - Stock Levels → /inventory/stock-levels
  - Lot/Serial Numbers → inventory/lots
  - Visual Audits → /camera-audit

Product Management:
  - Products → products
  - Categories → inventory/categories

Manufacturing:
  - Dashboard → manufacturing
  - Capacity Planning → #
  - Planning & Materials → #
  - Production → #
  - Resources → #
  - Quality Control → #
  - Maintenance → #
  - Costing → #
  - Reports → #

Capacity Planning:
  - Dashboard → manufacturing/capacity
  - Real-time Status → manufacturing/capacity/machineStatus
  - Analytics → manufacturing/capacity/analytics
  - Availability → manufacturing/capacity/availability
  - Feasibility → manufacturing/capacity/feasibility

Planning & Materials:
  - Bill of Materials → manufacturing/boms
  - MRP → manufacturing/mrp
  - Production Scheduling → manufacturing/scheduling

Production:
  - Work Orders → manufacturing/workorders
  - Shop Floor Control → manufacturing/shopfloor

Resources:
  - Business Lines → manufacturing/business-lines
  - Equipment Lines → manufacturing/equipment-lines
  - Equipment Units → manufacturing/equipment

Quality Control:
  - Dashboard → manufacturing/quality
  - Inspections → manufacturing/quality/inspections
  - NCR → manufacturing/quality/ncr
  - Metrics → manufacturing/quality/metrics
  - Templates → manufacturing/quality/templates

Maintenance:
  - Maintenance Schedules → manufacturing/maintenance/schedules
  - Maintenance Work Orders → manufacturing/maintenance/work-orders
  - Downtime Tracking → manufacturing/maintenance/downtime

Costing:
  - Production Costing → manufacturing/costing/production
  - Job Costing → manufacturing/costing/jobs

Sales:
  - Dashboard → sales/dashboard
  - Sales Documents → #
  - Fulfillment → #
  - Configuration → #
  - Reports → sales/reports

Sales Documents:
  - Quotes → quotes
  - Agreements → agreements
  - Orders → sales/orders
  - Invoices → invoices
  - Credit Notes → creditnotes

Fulfillment:
  - Shipments → shipments
  - Delivery Notes → sales/delivery_notes
  - Returns (RMA) → sales/returns

Configuration:
  - Pricing Rules → sales/pricing_rules
  - Discounts & Promotions → sales/promotions

Purchases:
  - Dashboard → purchases/dashboard
  - Suppliers → suppliers
  - Procurement Process → #
  - Payments & Documents → #
  - Supplier Contracts → purchases/contracts
  - Reports → purchases/reports

Suppliers:
  - Suppliers → suppliers
  - 1099 Contractors → /suppliers?filter=1099

Procurement Process:
  - Purchase Requisitions → purchases/requisitions
  - RFQs (Quotes) → purchases/rfqs
  - Purchase Orders → purchases/orders
  - Goods Receipt → purchases/receiving

Payments & Documents:
  - Bills/Invoices → purchases/bills
  - Payments Made (Legacy) → purchases/payments
  - Purchase Returns → purchases/returns
  - Debit Notes → purchases/debit-notes

Time Off:
  - My Time Off → hr/timeoff/my
  - All Requests → hr/timeoff/all
  - Approve Requests → hr/timeoff/approve
  - Time Off Types → hr/timeoff/types
  - Accrual Rules → hr/timeoff/accruals

Timesheets:
  - My Timesheet → hr/timesheets/my
  - All Timesheets → hr/timesheets/all
  - Approve Timesheets → hr/timesheets/approve
  - Timesheet Reports → hr/timesheets/reports

Lot/Serial Numbers:
  - All Lots/Serials → inventory/lots/all
  - Traceability → inventory/lots/traceability
  - Expiration Dates → inventory/lots/expiration

Multi-Currency:
  - Currencies → accounting/currency/list
  - Exchange Rates → accounting/currency/rates
  - Currency Gains/Losses → accounting/currency/revaluation

Automation:
  - AI Testing → ai-test
  - Approval Rules → settings/automation/approvals
  - Templates → automation/email-templates
  - Scheduled Actions → settings/automation/scheduled
  - Workflows → settings/automation/workflows

Projects:
  - Dashboard → projects/dashboard
  - My Projects → projects/?my_projects=1
  - My Tasks → projects/my-tasks
  - Gantt Chart → projects/gantt
  - Time Tracking → projects/time
  - Resource Planning → projects/resources
  - Project Profitability → projects/profitability

Files:
  - All Files → /files
  - My Files → /files?context=user
  - Shared With Me → files/shared
  - Accounting Files → /files?context=accounting
  - Company Files → /files?context=company
  - HR Documents → /files?context=hr
  - Inventory Documents → /files?context=inventory
  - Manufacturing Documents → /files?context=manufacturing
  - Project Files → /files?context=project
  - Purchases Documents → /files?context=purchases
  - Sales Documents → /files?context=sales

Email Marketing:
  - Dashboard → email-marketing/dashboard
  - Campaigns → email-marketing/campaigns
  - Email Templates → email-marketing/templates
  - Mailing Lists → email-marketing/lists
  - Automation → email-marketing/automation
  - Analytics → email-marketing/analytics

Helpdesk:
  - Dashboard → helpdesk/dashboard
  - Documentation → documentation
  - Tickets → helpdesk/tickets
  - My Tickets → helpdesk/my-tickets
  - SLA Management → helpdesk/sla
  - Knowledge Base → helpdesk/kb
  - Live Chat → helpdesk/chat
  - Reports → helpdesk/reports

APP GRID:
  - DASHBOARD → dashboard
  - CALENDAR → calendar
  - EMPLOYEES → employees/directory
  - PRODUCTS → products
  - SALES → salesorders
  - SETTINGS → settings

TOOLS:
  - Files → /files
  - Helpdesk → helpdesk
  - Projects → projects
  - Reports → reports/custom

Tax Management:
  - Tax Jurisdictions → /tax/jurisdictions
  - Tax Payments → /tax/payments
  - Tax Reports → /tax/reports/liability

Payments:
  - Customer Payments → /accounting/customer-payments
  - Vendor Payments → /accounting/vendor-payments

Administrative:
  - Access & Roles → #
  - Document Mgmt → #
  - Menu Mgmt → menus
  - PHPmyadmin → /phpmyadmin
  - System Backup → backup
  - System Scripts → admin/system-scripts

Document Mgmt:
  - Dashboard → nextcloud/admin/dashboard
  - Activity Log → nextcloud/admin/activity
  - Storage Report → nextcloud/admin/storage
  - User Activity → nextcloud/admin/users
  - Settings → nextcloud/settings

Forecaster:
  - Getting Started → /product-forecast/getting-started
  - Command Center → /product-forecast/command-center
  - Daily Update → assumptions
  - Assumption Sets → assumptions/sets
  - Product Configs → product-forecast
  - Generate Projections → product-forecast/generate
  - Pro Forma Stmts → product-forecast/proforma
  - Variance Tracking → /product-forecast/variance
  - Sensitivity Analysis → product-forecast/sensitivity
  - Compare Scenarios → product-forecast/compare
  - Variance Report → assumptions/variance
  - Advanced Tools → (no URL)
  - Scenario Modeler → forecaster

Total menu items: 273

🔐 PERMISSIONS ANALYSIS
--------------------------------------------------------------------------------
  (empty/top-level)               27 permissions
  1099                             7 permissions
  1099_contractors                 3 permissions
  accounting                      48 permissions
  admin                            4 permissions
  audit                            2 permissions
  automation                       1 permissions
  bank_import                      8 permissions
  credit_notes                     4 permissions
  crm                             34 permissions
  documents                        3 permissions
  Forecasting                      7 permissions
  helpdesk                         5 permissions
  hr                              46 permissions
  inventory                       31 permissions
  manufacturing                   26 permissions
  marketing                        8 permissions
  nextcloud                        4 permissions
  permissions                      1 permissions
  procurement                      5 permissions
  projects                         3 permissions
  purchases                       24 permissions
  recurring                        6 permissions
  reports                          2 permissions
  roles                            4 permissions
  sales                           41 permissions
  security                         5 permissions
  settings                         2 permissions
  statements                       4 permissions
  system                           5 permissions
  tax                             11 permissions
  users                            4 permissions

Total permissions: 385

⚠️  MISSING PERMISSIONS (Menu items without corresponding permissions)
--------------------------------------------------------------------------------
  Found 1 menu items without clear permission mappings:

    - #

🗑️  ORPHANED PERMISSIONS (Permissions without menu items)
--------------------------------------------------------------------------------
  Found 75 permissions without clear menu mappings:

    - 1099_contractors.manage (1099): Manage 1099 contractor designations
    - 1099_contractors.view (1099): View 1099 contractors
    - 1099_filings.file (1099): File 1099 forms
    - 1099_filings.prepare (1099): Prepare 1099 forms
    - 1099_payments.manage (1099): Manage 1099 payment classifications
    - 1099_payments.view (1099): View 1099 reportable payments
    - 1099_reports.view (1099): View 1099 reports
    - 1099_contractors.export (1099_contractors): Export 1099 Contractors
    - 1099_contractors.generate_reports (1099_contractors): Generate Reports 1099 Contractors
    - 1099_contractors.view_payments (1099_contractors): View Payments 1099 Contractors
    - audit_trail.export (audit): Export audit trail
    - audit_trail.view (audit): View audit trail
    - bank_import.categorize (bank_import): Categorize imported transactions
    - bank_import.create (bank_import): Import bank transactions
    - bank_import.delete (bank_import): Delete Bank Import
    - bank_import.edit (bank_import): Edit Bank Import
    - bank_import.import (bank_import): Import Bank Import
    - bank_import.manage_rules (bank_import): Manage Rules Bank Import
    - bank_import.rules (bank_import): Manage categorization rules
    - bank_import.view (bank_import): View bank imports
    ... and 55 more

📱 APP GRID ANALYSIS
--------------------------------------------------------------------------------
App Grid items:
  - DASHBOARD (dashboard) → ✓ Has permission: dashboard.view
  - CALENDAR (calendar) → ✓ Has permission: calendar.view
  - EMPLOYEES (employees/directory) → ✓ Has permission: employees.view
  - PRODUCTS (products) → ✓ Has permission: products.view
  - SALES (salesorders) → ✓ Has permission: salesorders.view
  - SETTINGS (settings) → ✓ Has permission: settings.view

RECOMMENDATION: Create 'App Grid' permission category in role editor
These should be DEFAULT permissions for all users:
  ☑ DASHBOARD
  ☑ CALENDAR
  ☑ EMPLOYEES
  ☑ PRODUCTS
  ☑ SALES
  ☑ SETTINGS

💡 STANDARDIZATION RECOMMENDATIONS
--------------------------------------------------------------------------------

Module naming issues:
  ✓ No obvious case inconsistencies found

  ℹ️  27 permissions have empty module (top-level items)

RECOMMENDATIONS:
  1. Standardize all module names to lowercase
  2. Add 'app_grid' or 'quick_access' module for App Grid items
  3. Consider grouping top-level items (empty module) into 'core' or 'general'
  4. Ensure every menu item has at least a 'view' permission
  5. Update role editor to show 'App Grid' as first category


================================================================================
AUDIT COMPLETE
================================================================================
