mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 10:15:40 +00:00
feat(auth): implement comprehensive authorization checks across API controllers
This commit is contained in:
1 parent
b5fe5dd909
commit
b1334a1bc6
5 files changed
+103
-1
No files matched your search
@@ -43,6 +43,10 @@ class ResourcesController extends Controller
|
||||
if (is_null($teamId)) {
|
||||
return invalidTokenResponse();
|
||||
}
|
||||
|
||||
// General authorization check for viewing resources - using Project as base resource type
|
||||
$this->authorize('viewAny', Project::class);
|
||||
|
||||
$projects = Project::where('team_id', $teamId)->get();
|
||||
$resources = collect();
|
||||
$resources->push($projects->pluck('applications')->flatten());
|
||||
|
||||
Reference in new issue
Block a user