#!/usr/bin/env php ==================================================================================================== PERMISSION FIX GENERATOR ==================================================================================================== 📋 FIXES TO APPLY ---------------------------------------------------------------------------------------------------- 📄 ActionMenuEditorController File: controllers/ActionMenuEditorController.php Method: create() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('admin.create'); 📄 ActivityController File: controllers/ActivityController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.delete'); 📄 AgreementController File: controllers/AgreementController.php Method: export() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.agreements.view'); 📄 BankAccountController File: controllers/BankAccountController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.delete'); 📄 BudgetController File: controllers/BudgetController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.delete'); 📄 CalendarController File: controllers/CalendarController.php Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('calendar.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('calendar.delete'); 📄 CategoryController File: controllers/CategoryController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('inventory.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('inventory.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('inventory.delete'); 📄 CompanyController File: controllers/CompanyController.php Method: export() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.view'); 📄 ContactController File: controllers/ContactController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.delete'); 📄 CurrencyController File: controllers/CurrencyController.php Method: deleteCurrency() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.delete'); Method: saveRate() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.edit'); Method: deleteRate() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.delete'); Method: importLiveRates() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.create'); 📄 DashboardController File: controllers/DashboardController.php Method: removeWidget() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('dashboard.delete'); Method: updateLayout() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('dashboard.edit'); 📄 DeliveryNoteController File: controllers/DeliveryNoteController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.create'); 📄 DepreciationController File: controllers/DepreciationController.php Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.delete'); 📄 DocumentController File: controllers/DocumentController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.delete'); 📄 ExpenseController File: controllers/ExpenseController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.create'); Method: reject() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.approve'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.delete'); 📄 FileManagerController File: controllers/FileManagerController.php Method: deleteFile() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('system.files.delete'); Method: deleteFolder() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('system.files.delete'); Method: removeShare() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('system.files.delete'); 📄 FinancialPlannerController File: controllers/FinancialPlannerController.php Method: exportExcel() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('forecasting.view'); 📄 FinancialProFormaController File: controllers/FinancialProFormaController.php Method: exportExcel() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('forecasting.view'); 📄 FixedAssetController File: controllers/FixedAssetController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.delete'); 📄 ForecasterController File: controllers/ForecasterController.php Method: deleteForecast() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('forecasting.delete'); Method: deleteScenario() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('forecasting.delete'); Method: deleteFinancing() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('forecasting.delete'); Method: deleteInvestment() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('forecasting.delete'); Method: showProFormaImport() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('forecasting.create'); 📄 Form1099Controller File: controllers/Form1099Controller.php Method: exportCSV() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('1099_contractors.view'); 📄 HelpDeskController File: controllers/HelpDeskController.php Method: chatSendMessage() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('tickets.create'); Method: create() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('tickets.create'); Method: store() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('tickets.create'); Method: updateStatus() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('tickets.edit'); Method: chatSendMessage() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('tickets.create'); 📄 JournalEntryController File: controllers/JournalEntryController.php Method: showImport() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.create'); 📄 MFAController File: controllers/MFAController.php Method: resendOTP() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('security.mfa.create'); 📄 MRPController File: controllers/MRPController.php Method: updateSafetyStock() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('manufacturing.edit'); Method: approveRequisition() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('manufacturing.approve'); 📄 MachineDataController File: controllers/MachineDataController.php Method: updateStatus() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('manufacturing.edit'); Method: updateProduction() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('manufacturing.edit'); Method: updateUtilization() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('manufacturing.edit'); Method: batchUpdate() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('manufacturing.edit'); 📄 MenuController File: controllers/MenuController.php Method: quickUpdate() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('settings.edit'); 📄 MessagingController File: controllers/MessagingController.php Method: sendMessage() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('messaging.create'); Method: updateStatus() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('messaging.edit'); Method: removeMember() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('messaging.delete'); Method: deleteChannel() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('messaging.delete'); 📄 NotificationController File: controllers/NotificationController.php Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('notifications.delete'); 📄 OpportunityController File: controllers/OpportunityController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.delete'); Method: updateTaskStatus() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.edit'); Method: sendEmail() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.create'); Method: deleteDocument() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.delete'); Method: deleteCompetitor() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.delete'); Method: saveCloseReason() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('crm.edit'); 📄 PermissionGroupController File: controllers/PermissionGroupController.php Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('permissions.delete'); 📄 PipedriveImportController File: controllers/PipedriveImportController.php Method: importOrganizations() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('admin.create'); Method: importDeals() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('admin.create'); Method: importLeads() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('admin.create'); Method: importNotes() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('admin.create'); Method: importFiles() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('admin.create'); Method: importAll() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('admin.create'); 📄 PricingRuleController File: controllers/PricingRuleController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.delete'); 📄 ProFormaController File: controllers/ProFormaController.php Method: export() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('forecasting.view'); Method: exportExcel() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('forecasting.view'); 📄 ProductForecastController File: controllers/ProductForecastController.php Method: updateConfig() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('product_forecast.edit'); Method: exportExcel() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('product_forecast.view'); Method: index() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); // ADD THIS BEFORE EXISTING checkPermission() Method: autoConfig() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); // ADD THIS BEFORE EXISTING checkPermission() Method: generate() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); // ADD THIS BEFORE EXISTING checkPermission() Method: proforma() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); // ADD THIS BEFORE EXISTING checkPermission() Method: sensitivity() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); // ADD THIS BEFORE EXISTING checkPermission() Method: compare() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); // ADD THIS BEFORE EXISTING checkPermission() 📄 ProfileController File: controllers/ProfileController.php Method: deleteCustomMenu() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('profile.delete'); Method: update() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('profile.edit'); Method: updateSettings() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('profile.edit'); 📄 ProjectsController File: controllers/ProjectsController.php Method: exportTasks() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.view'); Method: create() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.create'); Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.create'); Method: edit() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.edit'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.delete'); Method: updateTask() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.edit'); Method: deleteTask() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.delete'); Method: updateTeamMemberRole() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.edit'); Method: removeTeamMember() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.delete'); Method: removeTeamGroup() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.delete'); Method: exportFinancials() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.view'); Method: updateTransaction() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.edit'); Method: deleteTransaction() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.delete'); Method: updateTaskDates() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.edit'); Method: removeTaskDependency() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.delete'); Method: exportGanttPDF() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.view'); Method: exportGanttExcel() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('projects.view'); 📄 PromotionController File: controllers/PromotionController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.delete'); 📄 QualityController File: controllers/QualityController.php Method: updateNCR() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('manufacturing.edit'); 📄 QuickBooksController File: controllers/QuickBooksController.php Method: deleteMapping() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.delete'); Method: saveMapping() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('accounting.edit'); Method: saveSettings() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('accounting.edit'); 📄 QuoteController File: controllers/QuoteController.php Method: export() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.view'); 📄 ReturnController File: controllers/ReturnController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.edit'); Method: approve() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.approve'); Method: reject() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('sales.approve'); 📄 SalesReportController File: controllers/SalesReportController.php Method: exportReport() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('reports.view'); 📄 SchedulingController File: controllers/SchedulingController.php Method: deleteAssignment() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('manufacturing.delete'); 📄 SettingsController File: controllers/SettingsController.php Method: termsConditionsDelete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('settings.delete'); 📄 StockMovementController File: controllers/StockMovementController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('inventory.create'); 📄 SupportController File: controllers/SupportController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('tickets.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('tickets.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('tickets.delete'); Method: deleteAttachment() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('tickets.delete'); 📄 TaxFilingController File: controllers/TaxFilingController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('accounting.delete'); 📄 TransferController File: controllers/TransferController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('inventory.create'); 📄 UserGroupController File: controllers/UserGroupController.php Method: store() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('admin.create'); Method: update() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('admin.edit'); Method: delete() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('admin.delete'); Method: removeMember() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); $this->checkPermission('admin.delete'); 📄 NetworkMonitorController File: controllers/NetworkMonitorController.php Method: index() - HIGH PRIORITY Add at beginning of method: $this->requireAuth(); // ADD THIS BEFORE EXISTING checkPermission() 📄 CustomReportsController File: controllers/CustomReportsController.php Method: create() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('reports.create'); Method: store() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('reports.create'); Method: edit() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('reports.edit'); Method: update() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('reports.edit'); Method: delete() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('reports.delete'); 📄 DocumentsController File: controllers/DocumentsController.php Method: store() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('documents.create'); Method: delete() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('documents.delete'); 📄 InternalNoteAPIController File: controllers/InternalNoteAPIController.php Method: delete() - MEDIUM PRIORITY Add at beginning of method: $this->checkPermission('crm.delete'); Total fixes: 153 ==================================================================================================== GENERATION COMPLETE ====================================================================================================