Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
84d8896
Update PHP and Laravel dependencies
nathanwritescode-uk Nov 5, 2024
8ac3008
Remove guzzlehttp/guzzle dependency
nathanwritescode-uk Nov 5, 2024
3631f19
Update dependencies in composer.json
nathanwritescode-uk Nov 5, 2024
d9c9c91
Remove laravelcollective/html dependency
nathanwritescode-uk Nov 5, 2024
72db172
Update package versions in composer.json
nathanwritescode-uk Nov 5, 2024
c84bb93
Update dependencies in composer.json
nathanwritescode-uk Nov 5, 2024
3523465
Remove league/flysystem-cached-adapter dependency
nathanwritescode-uk Nov 5, 2024
7eccd24
Add Laravel Cashier and enhance script configuration
nathanwritescode-uk Nov 5, 2024
022bf70
Comment out HtmlServiceProvider in config
nathanwritescode-uk Nov 5, 2024
1adfb1e
Remove Cashier::ignoreMigrations() call from AppServiceProvider
nathanwritescode-uk Nov 5, 2024
ca96d4a
Update dependencies and configuration in composer.json
nathanwritescode-uk Nov 5, 2024
4156301
Update dependencies in composer.json
nathanwritescode-uk Nov 5, 2024
8eea473
Update dependencies in package.json
nathanwritescode-uk Nov 5, 2024
64d58d8
Remove --hide-modules flag from scripts in package.json
nathanwritescode-uk Nov 5, 2024
83c24c1
Update .env.example with detailed configuration variables
nathanwritescode-uk Nov 6, 2024
770b34d
Upgrade PHPUnit workflow to latest dependencies
nathanwritescode-uk Nov 5, 2024
9c17652
Update PHPUnit workflow to include workflow_dispatch
nielsdrost7 Apr 7, 2026
a844c2d
Add files via upload
nielsdrost7 Apr 7, 2026
6946145
Merge branch 'master' into develop
nielsdrost7 Apr 7, 2026
301514c
ran pint
nielsdrost7 Apr 7, 2026
5e172ec
Fix relative URLs in blade templates
Copilot Apr 8, 2026
7611634
Configure axios baseURL and fix remaining window.location redirects
Copilot Apr 8, 2026
2d5252f
Improve code readability by consolidating URL construction
Copilot Apr 8, 2026
becd50f
Improve URL construction readability in upload modal
Copilot Apr 8, 2026
62b305b
Add documentation and clarify security concerns
Copilot Apr 8, 2026
ecdbd07
Use explicit route mapping for better maintainability
Copilot Apr 8, 2026
ff690f3
Remove fallback in route mapping for fail-fast behavior
Copilot Apr 8, 2026
c060287
Add comprehensive PHPUnit tests for subdirectory URL generation
Copilot Apr 8, 2026
e45baba
Fix hardcoded JS asset paths to use asset() helper for subdirectory s…
Copilot Apr 8, 2026
9aa044c
tmp
nielsdrost7 Apr 8, 2026
20bc17f
Add APP_ENV and APP_KEY to phpunit.xml to fix cipher error
Copilot Apr 11, 2026
18f6cc6
Feat: laravel (11,12) upgrade (#350)
nielsdrost7 Apr 12, 2026
4875ad3
[Standards]: phpunit (#421)
nielsdrost7 Apr 12, 2026
2e6ead8
Add refactoring plan documentation
nielsdrost7 Apr 12, 2026
b23927b
Update refactoring-plan.md
nielsdrost7 Apr 12, 2026
62a69b1
Simplify refactoring plan by removing redundancy
nielsdrost7 Apr 12, 2026
fae829f
Consolidate refactoring docs and enhance guidelines
Copilot Apr 12, 2026
d894619
Phase 1.1: Create missing FormRequests for validation
Copilot Apr 12, 2026
d48a1e7
Phase 1.2: Move controller tests from Unit/ to Feature/
Copilot Apr 12, 2026
f6d3f62
Phase 1.3a: Expand PermissionName enum with all permissions
Copilot Apr 12, 2026
56ecf91
Phase 1.3b: Replace permission string literals with enum references
Copilot Apr 12, 2026
454bebb
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] Apr 12, 2026
31c2792
Fix FormRequest validation issues per code review
Copilot Apr 12, 2026
3bc1c00
Phase 2.1a: Create status enums for type safety
Copilot Apr 13, 2026
ab26fa1
Phase 2.3: Add zero validation to ClientNumberService
Copilot Apr 13, 2026
6248407
Phase 4.2 & 3.6: Add RoleType enum and Status validation helper
Copilot Apr 13, 2026
adba4cb
Apply suggestions from code review
nielsdrost7 Apr 13, 2026
306930d
Document detailed Phase 3 & 4 implementation plans
Copilot Apr 13, 2026
a1f39d5
Laravel 12: Refactoring up until phase 2.2:
nielsdrost7 Apr 13, 2026
4028c35
Entrust Permission problems
nielsdrost7 Apr 13, 2026
05b3221
Laravel 12: Trying to fix Entrust Permission problems
nielsdrost7 Apr 13, 2026
be9a817
Improved Pint, ran pint, phpstorm regions fixed
nielsdrost7 Apr 13, 2026
3643aa1
Laravel 12: Makefile professionalization
nielsdrost7 Apr 13, 2026
83915db
Update app/Http/Middleware/Client/CanClientCreate.php
nielsdrost7 Apr 13, 2026
2f866c3
Update app/Services/Storage/GoogleDrive.php
nielsdrost7 Apr 13, 2026
82045e3
Update config/purifier.php
nielsdrost7 Apr 13, 2026
86903ae
Bugfix/entrust permission problems (#425)
nielsdrost7 May 10, 2026
3fb5059
Refactor Unit and Feature tests to follow AAA structure with DocBlock…
Copilot May 10, 2026
46e1596
Refactor remaining Feature and all Browser tests to follow AAA structure
Copilot May 10, 2026
516f8ab
Remove all remaining single-line comments from test setUp methods
Copilot May 10, 2026
9b719eb
Fix Browser tests to keep Act & Assert in same browse callback, remov…
Copilot May 10, 2026
a10f560
Remove remaining single-line comments from Browser tests
Copilot May 10, 2026
447a77f
Update tests/Feature/Controllers/Client/ClientsControllerTest.php
nielsdrost7 May 10, 2026
aadc1e3
Apply suggestion from @coderabbitai[bot]
nielsdrost7 May 10, 2026
dfcfbce
Apply suggestion from @coderabbitai[bot]
nielsdrost7 May 10, 2026
6f6072c
Apply suggestion from @coderabbitai[bot]
nielsdrost7 May 10, 2026
6abf05b
Fix test isolation and permission caching issues
Copilot May 10, 2026
64f35aa
Improve weak test: add proper Arrange and Act phases to permission test
Copilot May 10, 2026
dd44ab2
Strengthen weak tests: add database and response content assertions t…
Copilot May 10, 2026
6271e28
Strengthen RoleControllerTest: add database assertions to verify role…
Copilot May 10, 2026
cc2015f
Fix test issues: use external_id in routes, remove duplicate setup, r…
Copilot May 10, 2026
6bbccb8
feat: Implement N+1 query optimizations for client loading
Copilot May 10, 2026
03186f4
test: Add comprehensive unit tests for ClientService
Copilot May 10, 2026
eb1b67b
fix: Add N+1 query optimization to UsersController
Copilot May 10, 2026
b982be1
refactor: Address code review feedback
Copilot May 10, 2026
8412283
Potential fix for pull request finding
nielsdrost7 May 10, 2026
f8ec4ba
Update tests/Feature/Performance/ClientPerformanceTest.php
nielsdrost7 May 10, 2026
3d60c18
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] May 10, 2026
9a91152
refactor: Move ClientPerformanceTest to proper location
Copilot May 10, 2026
c981344
docs: Update test comments to reflect N+1 fixes
Copilot May 10, 2026
55c09fa
docs: Refine test comment wording for clarity
Copilot May 10, 2026
538aefe
docs: Clarify test comment assertion mechanism
Copilot May 10, 2026
f6c9ed6
Fix trait method collision between SoftDeletes and EntrustUserTrait
Copilot May 10, 2026
3eac0ec
Fix GROUP environment variable defaulting to 'full' for push/PR events
Copilot May 10, 2026
7b8831f
composer update
nielsdrost7 May 11, 2026
3b9a33f
Fix invoice relations test to assert HasMany relation type
Copilot May 11, 2026
a42a2e8
Refactoring Markdown file
nielsdrost7 May 11, 2026
dae748e
Revise documentation phases and consolidate content
nielsdrost7 May 11, 2026
cd5a8b2
tmp
nielsdrost7 May 11, 2026
c2ec636
upgrade to vite
nielsdrost7 May 11, 2026
ab3e369
just package.json and yarn.lock
nielsdrost7 May 11, 2026
982481d
trying to repair frontend
nielsdrost7 May 11, 2026
e707a13
Improve agents.md file
nielsdrost7 May 11, 2026
802e3fa
Revert "Improve agents.md file"
nielsdrost7 May 11, 2026
6e76987
Revert "trying to repair frontend"
nielsdrost7 May 11, 2026
90d5796
Revert "just package.json and yarn.lock"
nielsdrost7 May 11, 2026
d5e6cbd
Revert "upgrade to vite"
nielsdrost7 May 11, 2026
495c5ea
Revert "tmp"
nielsdrost7 May 11, 2026
0d15b97
Revert "Revise documentation phases and consolidate content"
nielsdrost7 May 11, 2026
180a7f9
Revert "Refactoring Markdown file"
nielsdrost7 May 11, 2026
5dbe2a9
just .github directory
nielsdrost7 May 18, 2026
2383566
just tests/e2e directory
nielsdrost7 May 18, 2026
1f9095a
Remove files moved into develop
nielsdrost7 May 18, 2026
9af428e
fix: harden user creation failures and restore GetDateFormat alias
Copilot May 20, 2026
4f02d65
introduce jquery minified into develop branch
nielsdrost7 May 20, 2026
f531bf6
introduce md files into develop branch
nielsdrost7 May 20, 2026
6e58b05
try to sync up with develop and feature branch
nielsdrost7 May 20, 2026
84d6e5f
merge Unit tests into develop branch
nielsdrost7 May 20, 2026
ce26cb9
try to sync up with develop and feature branch
nielsdrost7 May 20, 2026
7634455
fix: add missing services, migration, and test fixes for failing CI
Copilot May 20, 2026
c3c4f9d
fix: return 404 when updating role with invalid external id
Copilot May 20, 2026
303ac0c
Feature: Refactor Fat Controllers
nielsdrost7 May 20, 2026
3c4b074
ran pint
nielsdrost7 May 20, 2026
53510fc
AbstractTestCase needed
nielsdrost7 May 20, 2026
8aa9b02
Refactor comments in DropboxTest.php
nielsdrost7 May 20, 2026
b13f2b0
Align Dropbox null handling and auth URL assertions
Copilot May 20, 2026
8f7b5c2
Refresh core documentation set
Copilot May 20, 2026
bb3052b
Refactor README from legacy content
Copilot May 20, 2026
51f4597
Add incomplete reasons and soften phpunit workflow issue-only failures
Copilot May 20, 2026
9cde911
added favicon to calendar page (#303)
AGrant24 May 20, 2026
bdcfda3
288: Create command to create first user in the database
nielsdrost7 May 20, 2026
ed4f03c
288: ran pint
nielsdrost7 May 20, 2026
d7798f6
Change command signature for CreateAdminUser
nielsdrost7 May 20, 2026
64292e6
Rename artisan command from user:create-admin to daybyday:create-admin
nielsdrost7 May 20, 2026
de56c3f
Fix all review comments from PR #442 code review
Copilot May 20, 2026
40b2dc2
[CRM-288]: Feature: create first user (#442)
nielsdrost7 May 20, 2026
500f413
218: add "new" button on the Index Pages of Clients, Tasks, you name it
nielsdrost7 May 20, 2026
569bbe0
Use PermissionName for heading CTAs and tighten index CTA tests
Copilot May 20, 2026
a802242
Define DEFAULT_LANGUAGE in CreateAdminUser command
nielsdrost7 May 21, 2026
d4dc60e
Change DEFAULT_LANGUAGE to public visibility
nielsdrost7 May 21, 2026
2fbec90
fix: guard interactive prompts against --no-interaction mode in Creat…
Copilot May 21, 2026
63cad5d
fix: include reason when creating guaranteed absence
Copilot May 24, 2026
b31a8b5
test: scaffold playwright coverage specs
Copilot May 24, 2026
51ce10f
test: add playwright coverage for auth and feature gaps
Copilot May 24, 2026
bfccb15
Simple Fixes
nielsdrost7 May 24, 2026
2132013
Clean up Playwright tests
nielsdrost7 May 24, 2026
3f202c4
Clean up Playwright tests
nielsdrost7 May 24, 2026
f47cf68
quick commit
nielsdrost7 May 24, 2026
4fa6a9a
quick commit
nielsdrost7 May 24, 2026
566a980
ci: build frontend assets before Playwright server readiness check
Copilot May 25, 2026
5f45c8d
fix: resolve fixtures user-auth import path
Copilot May 25, 2026
24b6009
Fix flaky user attribute test without department
Copilot May 25, 2026
6824341
Feature: Playwright tests (#450)
nielsdrost7 May 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2

[compose.yaml]
indent_size = 4
18 changes: 4 additions & 14 deletions .env.ci
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
APP_ENV=testing
APP_DEBUG=true
APP_KEY=base64:lEEqEYFZGEYHBd3y3RPofI9FozOKwBCEiTANoaH2eUs=
APP_KEY=base64:xxx

CACHE_DRIVER=array
CACHE_STORE=array
SESSION_DRIVER=file
SESSION_DOMAIN=null
QUEUE_CONNECTION=sync
QUEUE_DRIVER=sync

REDIS_HOST=localhost
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=daybyday_test
DB_USERNAME=root
DB_PASSWORD=password

2 changes: 1 addition & 1 deletion .env.dusk.local
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DB_USERNAME=root
DB_PASSWORD=root
DB_PORT=3306

CACHE_DRIVER=array
CACHE_STORE=array
SESSION_DRIVER=file
QUEUE_DRIVER=sync

Expand Down
66 changes: 54 additions & 12 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,26 +1,68 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_KEY=i53weLzCSdunQzNc2SXR2AE9XJVDuNaq
APP_TIMEZONE=UTC
APP_URL=http://localhost

DB_HOST=localhost
DB_DATABASE=database
DB_USERNAME=username
DB_PASSWORD=password
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
DEBUGBAR_ENABLED=false

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database

REDIS_HOST=localhost
# PHP_CLI_SERVER_WORKERS=4

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_USERNAME=root
# DB_PASSWORD=

SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=database
CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_MAILER=log
MAIL_SCHEME=null
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false


VITE_APP_NAME="${APP_NAME}"
37 changes: 37 additions & 0 deletions .env.testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
APP_ENV=testing
APP_DEBUG=true
APP_KEY=base64:HlxW5wzUCf5xPY/YTueJnUKzq4OZ6qByEjQhwYCDU/U=

APP_TIMEZONE=UTC
APP_LOCALE=en
APP_FALLBACK_LOCALE=en

CACHE_STORE=array
SESSION_DRIVER=array
SESSION_DOMAIN=null
QUEUE_CONNECTION=sync
QUEUE_DRIVER=sync

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=daybyday_test
DB_USERNAME=root
DB_PASSWORD=password

MAIL_MAILER=array
BROADCAST_CONNECTION=null

BCRYPT_ROUNDS=4

LOG_CHANNEL=stack
LOG_LEVEL=debug

# — a sent invoice in your test database
SEED_INVOICE_EXTERNAL_ID=

# — a draft/unsent invoice
SEED_DRAFT_INVOICE_EXTERNAL_ID=

# — one seeded appointment (since the store route doesn't exist)
SEED_APPOINTMENT_EXTERNAL_ID=
15 changes: 11 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
* text=auto
*.css linguist-vendored
*.less linguist-vendored
*.rb linguist-language=Php
* text=auto eol=lf

*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php

/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore
54 changes: 54 additions & 0 deletions .github/ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# System Architecture & Technical Analysis

## System Overview
DaybydayCRM is a modular CRM built with Laravel, separating logic into domain-specific modules. It utilizes a layered architecture (Controllers → Services/Actions → Repositories → Models).

---

## Technical Debt & Analysis

### 1. Factories & Database Defaults
- **Problem:** Many models (Activity, Lead, Project, Task) depend on observers or manual `boot` method logic for critical fields like `external_id` (UUID). This logic is often bypassed during tests, causing "Missing Default Value" errors.
- **Goal:** Modernize all factories to Class-based models and centralize UUID generation in the `HasExternalId` trait.

### 2. Business Logic Leaks
- **Problem:** Fat controllers are common, handling activity logging, notification sending, and data transformation.
- **Solution:** Encapsulate business logic in Service classes or single-purpose Action classes (`app/Actions/`). Controllers should focus on request handling and response generation.

### 3. Authorization & Permissions
- **Problem:** The current authorization system (Entrust) is aging and complex. Some policies are missing or incorrectly referenced.
- **Goal:** Audit all Policies and transition to Laravel's native Gates and Policies for better consistency and performance.

### 4. Frontend Asset Pipeline
- **Problem:** Vue 2 is End-of-Life (EOL), and the asset pipeline relies on legacy `laravel-mix` (Webpack).
- **Goal:** Roadmap migration to Vue 3 and Vite for faster development and improved security.

---

## Core Infrastructure

### Trait-Based Behavior
- **Blameable:** Automatically tracks `user_created_id` and `user_updated_id`.
- **Statusable:** Standardized status handling with helper methods.
- **HasExternalId:** Automatically generates UUIDs for `external_id` and sets it as route key.

### Model Observer Pattern
Observers are used for automatic side effects:
- File deletion upon model removal.
- Cascade soft deletes.
- Automatic logging/auditing.
- Search index updates.
- Registered in `AppServiceProvider::boot()`.

### Repository Pattern
Used for:
- Data access abstraction.
- External system integration (e.g., Billing, Filesystem).
- Multi-tenant query scoping.

---

## API Architecture
- **API routes:** `routes/api.php`
- **Authentication:** `auth:api` middleware.
- **Response Format:** Standard JSON responses.
98 changes: 98 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Changelog - Authorization and Security Fixes

## [Unreleased] - 2026-04-08

### Security Fixes

#### SearchController: Arbitrary Class Instantiation Prevention
- **Issue**: URL parameter used directly as class name allowing arbitrary class instantiation.
- **Fix**: Added allowlist validation for search types.
- **Allowed types**: Client, Task, Project, Lead, User.
- **Impact**: CRITICAL - Prevents potential remote code execution.

#### Authorization Enforcement Added

All delete operations across resource types now properly enforce permission checks via middleware:

- **UsersController**: Added `user-delete` permission check to `destroy()` method
- **ClientsController**: Added `client-delete` permission check to `destroy()` method
- **TasksController**: Added `task-delete` permission check to `destroy()` method
- **LeadsController**: Added `lead-delete` permission checks to both `destroy()` and `destroyJson()` methods
- **ProjectsController**: Added `project-delete` permission check to `destroy()` method
- **OffersController**: Added comprehensive permission checks:
- `offer-create` for `create()` method
- `offer-edit` for `update()`, `won()`, and `lost()` methods

#### Settings Access Control

- **SettingsController**: Extended admin-only middleware from `index` to include `updateOverall` and `updateFirstStep` methods, preventing non-admin users from modifying:
- Company currency and VAT rate
- Invoice and client numbering schemes
- Business hours

#### Assignment Permission Checks

- **ProjectsController**: Added `can-assign-new-user-to-project` permission check to `updateAssign()` method
- **TasksController**: Added `task-update-linked-project` permission check to `updateProject()` method

#### File Upload Authorization

- **DocumentsController**: Enabled previously commented-out permission checks:
- `task-upload-files` permission for `uploadToTask()` method
- `project-upload-files` permission for `uploadToProject()` method

### Mass Assignment Protection

Fixed mass assignment vulnerabilities in status update endpoints by replacing `fill($request->all())` with explicit field filtering:

- **TasksController::updateStatus**: Now only accepts `status_id` field
- **LeadsController::updateAssign**: Now only accepts `user_assigned_id` field
- **LeadsController::updateStatus**: Now only accepts `status_id` field
- **ProjectsController::updateStatus**: Now only accepts `status_id` field

This prevents malicious users from modifying unintended fields (title, description, assigned user, etc.) via status update requests.

### Database Schema Updates

Added missing permissions to `PermissionsTableSeeder`:
- `task-delete`: Permission to delete a task
- `lead-delete`: Permission to delete a lead
- `project-delete`: Permission to delete a project

### Code Quality Improvements

- Added null checks when resolving `Status` by external ID to prevent null pointer exceptions
- Improved error handling in status update methods across Tasks, Leads, and Projects controllers

### Testing

Added comprehensive PHPUnit authorization test suites with `#[Group('authorization-fix')]` attribute:

- **TaskAuthorizationTest**: 5 tests covering delete, project update, and mass assignment protection
- **LeadAuthorizationTest**: 4 tests covering delete and mass assignment protection
- **ProjectAuthorizationTest**: 5 tests covering delete, assignment, and mass assignment protection
- **ClientAuthorizationTest**: 2 tests covering delete authorization
- **UserAuthorizationTest**: 3 tests covering delete authorization and owner protection
- **OfferAuthorizationTest**: 8 tests covering create, edit, won/lost, and authorization
- **SettingsAuthorizationTest**: 6 tests covering admin-only access controls
- **DocumentAuthorizationTest**: 4 tests covering file upload permissions

Fixed incomplete tests:
- Removed `markTestIncomplete()` from `UsersControllerTest::owner_can_update_user_role()`
- Removed `markTestIncomplete()` from `PaymentsControllerTest::can_delete_payment()`

### Impact

**Before**: Any authenticated user could delete any resource, modify critical system settings, and exploit mass assignment to change arbitrary model fields.

**After**: All operations enforce proper role-based authorization as defined in the database permissions system.

### Migration Notes

Existing installations should run database seeders to ensure the new permissions (`task-delete`, `lead-delete`, `project-delete`) are created:

```bash
php artisan db:seed --class=PermissionsTableSeeder
```

Administrators should review and assign the new delete permissions to appropriate roles based on their organization's security policies.
Loading
Loading