You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Remove deprecated CSV export permission flags (`bCSVAdminOnly` and
`bExportCSV`) that provided no real security value since users could
already export data via DataTables buttons on every table.
## Why
These settings created a false sense of security:
- `bCSVAdminOnly` - Restricted CSV option in financial report forms, but
users could still export via DataTables
- `bExportCSV` - User permission that only hid some CSV buttons, while
DataTables export remained available
Both settings added UI complexity without actual data protection.
Removing them simplifies the codebase and user management.
## Changes
### System Configuration
- Removed `bCSVAdminOnly` from `SystemConfig.php`
- Removed conditional logic from all financial report forms
### User Permissions
- Removed `isCSVExport()` and `isCSVExportEnabled()` methods from
`User.php`
- Removed permission check from `CSVExport.php`
- Updated `Header.php` to always show DataTables export buttons
- Updated cart functions to always show CSV export button
- Removed `csvExport` from admin user API response
- Removed `CSVExport` from access-denied page role descriptions
### Database
- Created `src/mysql/upgrade/6.8.0.sql` to delete both settings from
existing installations
## Files Changed
| File | Change |
|------|--------|
| `src/ChurchCRM/dto/SystemConfig.php` | Remove bCSVAdminOnly config |
| `src/ChurchCRM/model/ChurchCRM/User.php` | Remove CSV export methods |
| `src/CSVExport.php` | Remove permission check |
| `src/Include/Header.php` | Always show DataTables buttons |
| `src/FinancialReports.php` | Simplify CSV option logic |
| `src/ReminderReport.php` | Remove bCSVAdminOnly check |
| `src/TaxReport.php` | Remove bCSVAdminOnly check |
| `src/Reports/*.php` (6 files) | Remove bCSVAdminOnly checks |
| `src/finance/views/reports.php` | Remove warning message |
| `src/admin/routes/api/user-admin.php` | Remove csvExport from response
|
| `src/v2/templates/cart/cartfunctions.php` | Always show CSV button |
| `src/v2/templates/common/access-denied.php` | Remove CSVExport role |
| `src/mysql/install/Install.sql` | Remove default setting |
| `src/mysql/upgrade/6.8.0.sql` | New upgrade script |
## Testing
- ✅ CSV reports test (6 passing)
- ✅ Finance reports test (10 passing)
- ✅ Cart tests (4 passing)
- ✅ Admin reports test (1 passing)
- ✅ Admin user test (3 passing)
- ✅ No PHP errors in logs
Copy file name to clipboardExpand all lines: src/ChurchCRM/dto/SystemConfig.php
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,6 @@ private static function buildConfigs(): array
101
101
'sDirRoleChild' => newConfigItem(8, 'sDirRoleChild', 'choice', '3', gettext('These are the family role numbers designated as child'), '', json_encode(SystemConfig::getFamilyRoleChoices(), JSON_THROW_ON_ERROR)),
102
102
'iSessionTimeout' => newConfigItem(9, 'iSessionTimeout', 'number', '3600', gettext("Session timeout length in seconds\nSet to zero to disable session timeouts.")),
103
103
'aFinanceQueries' => newConfigItem(10, 'aFinanceQueries', 'text', '28,30', gettext('Queries for which user must have finance permissions to use') . ':'),
104
-
'bCSVAdminOnly' => newConfigItem(11, 'bCSVAdminOnly', 'boolean', '1', gettext('Should only administrators have access to the CSV export system and directory report?')),
105
104
'iMinPasswordLength' => newConfigItem(13, 'iMinPasswordLength', 'number', '6', gettext('Minimum length a user may set their password to')),
106
105
'iMinPasswordChange' => newConfigItem(14, 'iMinPasswordChange', 'number', '4', gettext("Minimum amount that a new password must differ from the old one (# of characters changed)\nSet to zero to disable this feature")),
107
106
'aDisallowedPasswords' => newConfigItem(15, 'aDisallowedPasswords', 'text', 'password,god,jesus,church,christian', gettext('A comma-separated list of disallowed (too obvious) passwords.')),
@@ -274,7 +273,7 @@ private static function buildCategories(): array
0 commit comments