# Roles & permissions (defaults)

> Generated by `php artisan permissions:matrix` from `PermissionRegistry` and `DefaultRoleMatrix`.
> Do not edit by hand. These are the grants a role receives when it is first created; administrators
> can change them afterwards in **Users → Roles & permissions**.

**Notes**
- **Super Admin** passes every check (Gate::before). Some actions are Super Admin only even when a
  permission is granted to another role: permanent deletion, backups, and AI provider/API keys.
- Row-level visibility always applies on top: without *View all*, users see their own and assigned
  contracts (plus their department's with *View own department contracts*).
- Financial amounts need *View financial data*. The audit log is also limited by contract visibility.

## Contracts

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| View `contracts.view` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| View all records (company-wide) `contracts.view_all` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | · | · | ✅ |
| View own department contracts `contracts.view_department` | ✅ | ✅ | ✅ | ✅ | · | · | · | ✅ | · | · |
| Create `contracts.create` | ✅ | ✅ | ✅ | ✅ | · | · | ✅ | ✅ | ✅ | · |
| Edit `contracts.edit` | ✅ | ✅ | ✅ | ✅ | ✅ | · | ✅ | ✅ | ✅ | · |
| Delete `contracts.delete` (Employee: own and assigned contracts only) | ✅ | ✅ | ✅ | ✅ | · | · | · | · | ✅ | · |
| Archive `contracts.archive` | ✅ | ✅ | ✅ | ✅ | · | · | · | · | · | · |
| Restore `contracts.restore` | ✅ | ✅ | ✅ | ✅ | · | · | · | · | · | · |
| Permanently delete `contracts.force_delete` | ✅ | · | · | · | · | · | · | · | · | · |
| View financial data `contracts.view_financials` | ✅ | ✅ | ✅ | ✅ | · | ✅ | · | · | · | ✅ |
| Edit financial data `contracts.edit_financials` | ✅ | ✅ | ✅ | ✅ | · | ✅ | · | · | · | · |
| Upload files `contracts.upload` | ✅ | ✅ | ✅ | ✅ | ✅ | · | ✅ | ✅ | ✅ | · |
| Download files `contracts.download` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Approve `contracts.approve` (no longer used for entries) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | · | ✅ | · | · |
| Reject `contracts.reject` (no longer used for entries) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | · | ✅ | · | · |
| Renew `contracts.renew` | ✅ | ✅ | ✅ | ✅ | · | · | ✅ | ✅ | · | · |
| Transfer ownership `contracts.transfer` | ✅ | ✅ | ✅ | ✅ | · | · | · | · | · | · |
| Export `contracts.export` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | · | ✅ |
| Bulk actions `contracts.bulk_update` | ✅ | ✅ | ✅ | ✅ | · | · | · | · | · | · |

## Organizations & parties

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| View `organizations.view` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Create `organizations.create` | ✅ | ✅ | ✅ | ✅ | · | · | ✅ | ✅ | ✅ | · |
| Edit `organizations.edit` | ✅ | ✅ | ✅ | ✅ | · | · | ✅ | ✅ | · | · |
| Delete `organizations.delete` | ✅ | ✅ | ✅ | ✅ | · | · | · | · | · | · |

## Documents

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| View `documents.view` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Upload files `documents.upload` | ✅ | ✅ | ✅ | ✅ | ✅ | · | ✅ | ✅ | ✅ | · |
| Download files `documents.download` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Delete `documents.delete` | ✅ | ✅ | ✅ | ✅ | · | · | · | · | · | · |

## Smart extraction (OCR / AI)

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| Run `extractions.run` | ✅ | ✅ | ✅ | ✅ | · | · | ✅ | ✅ | ✅ | · |
| Review & confirm `extractions.review` | ✅ | ✅ | ✅ | ✅ | ✅ | · | ✅ | ✅ | · | · |

## Payments

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| View `payments.view` | ✅ | ✅ | ✅ | ✅ | · | ✅ | · | · | · | ✅ |
| Manage `payments.manage` | ✅ | ✅ | ✅ | · | · | ✅ | · | · | · | · |

## Tasks

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| View `tasks.view` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Manage `tasks.manage` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | · |

## Reports

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| View `reports.view` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Export `reports.export` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | · | ✅ |
| Email `reports.email` | ✅ | ✅ | ✅ | ✅ | · | ✅ | ✅ | ✅ | · | · |
| Manage saved templates `reports.manage_templates` | ✅ | ✅ | ✅ | ✅ | · | · | · | · | · | · |

## Users

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| View `users.view` | ✅ | ✅ | ✅ | ✅ | · | · | · | ✅ | · | ✅ |
| Manage `users.manage` | ✅ | ✅ | ✅ | · | · | · | · | · | · | · |

## Roles

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| Manage `roles.manage` | ✅ | ✅ | · | · | · | · | · | · | · | · |

## Departments

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| Manage `departments.manage` | ✅ | ✅ | ✅ | · | · | · | · | · | · | · |

## Notifications

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| Manage `notifications.manage` | ✅ | ✅ | ✅ | · | · | · | · | · | · | · |

## Settings

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| Manage `settings.manage` | ✅ | ✅ | · | · | · | · | · | · | · | · |

## Audit log

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| View `audit.view` | ✅ | ✅ | ✅ | · | · | · | · | · | · | ✅ |

## System

| Permission | Super Admin | System Admin | General Manager | Contract Manager | Legal | Finance | Operations | Department Manager | Employee | Viewer / Auditor |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| System health page `system.health` | ✅ | ✅ | ✅ | · | · | · | · | · | · | · |
| Backups `system.backups` | ✅ | ✅ | · | · | · | · | · | · | · | · |
