coolify/tests/Unit/Policies
Andras Bacsai 5b370713c3 fix(sources): prevent 500 when deleting GitLab/GitHub apps
After delete, Livewire still re-renders the source change view (modal
$refresh / morph). Policy @can checks then call isAdminOfTeam() with a
null team_id and throw a TypeError (HTTP 500) before the redirect.

Guard null team_id in GitlabAppPolicy and GithubAppPolicy, clear the
Livewire model after delete, and skip @can when the model is gone.
2026-08-01 18:34:38 +02:00
..
ApiTokenPolicyTest.php refactor(auth): enforce team member authorization across app 2026-02-27 11:41:01 +01:00
ApplicationPolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
ApplicationPreviewPolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
ApplicationSettingPolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
DatabasePolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
EnvironmentPolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
EnvironmentVariablePolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
GithubAppPolicyTest.php fix(sources): prevent 500 when deleting GitLab/GitHub apps 2026-08-01 18:34:38 +02:00
GitlabAppPolicyTest.php fix(sources): prevent 500 when deleting GitLab/GitHub apps 2026-08-01 18:34:38 +02:00
NotificationPolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
PrivateKeyPolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
ProjectPolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
ResourceCreatePolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
S3StoragePolicyTest.php refactor(auth): enforce team member authorization across app 2026-02-27 11:41:01 +01:00
ServerPolicyTest.php fix(auth): restrict Sentinel access and register S3 policy 2026-06-15 12:31:30 +02:00
ServiceApplicationPolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
ServiceDatabasePolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
ServicePolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
SharedEnvironmentVariablePolicyTest.php test(browser): cover resource settings persistence 2026-02-25 19:26:55 +01:00
StandaloneDockerPolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
SwarmDockerPolicyTest.php fix(auth): enforce authorization checks across API and Livewire components 2026-02-25 14:20:29 +01:00
TeamPolicyTest.php fix: improve team resource route handling 2026-07-02 13:05:27 +02:00