mirror of
https://github.com/coollabsio/coolify.git
synced 2026-10-04 13:07:06 -04:00
feat(auth): authorize sqlite databases with the database policy
This commit is contained in:
@@ -17,6 +17,7 @@ use App\Models\StandaloneMongodb;
|
||||
use App\Models\StandaloneMysql;
|
||||
use App\Models\StandalonePostgresql;
|
||||
use App\Models\StandaloneRedis;
|
||||
use App\Models\StandaloneSqlite;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
@@ -38,6 +39,7 @@ class CanUpdateResource
|
||||
StandaloneDragonfly::class,
|
||||
StandaloneClickhouse::class,
|
||||
StandaloneMongodb::class,
|
||||
StandaloneSqlite::class,
|
||||
],
|
||||
'stack_service_uuid' => [ServiceApplication::class, ServiceDatabase::class],
|
||||
'service_uuid' => [Service::class],
|
||||
|
||||
@@ -12,6 +12,7 @@ use App\Models\StandaloneMongodb;
|
||||
use App\Models\StandaloneMysql;
|
||||
use App\Models\StandalonePostgresql;
|
||||
use App\Models\StandaloneRedis;
|
||||
use App\Models\StandaloneSqlite;
|
||||
use App\Models\User;
|
||||
|
||||
class ResourceCreatePolicy
|
||||
@@ -28,6 +29,7 @@ class ResourceCreatePolicy
|
||||
StandaloneKeydb::class,
|
||||
StandaloneDragonfly::class,
|
||||
StandaloneClickhouse::class,
|
||||
StandaloneSqlite::class,
|
||||
Service::class,
|
||||
Application::class,
|
||||
GithubApp::class,
|
||||
|
||||
@@ -36,6 +36,7 @@ use App\Models\StandaloneMongodb;
|
||||
use App\Models\StandaloneMysql;
|
||||
use App\Models\StandalonePostgresql;
|
||||
use App\Models\StandaloneRedis;
|
||||
use App\Models\StandaloneSqlite;
|
||||
use App\Models\SwarmDocker;
|
||||
use App\Models\Tag;
|
||||
use App\Models\Team;
|
||||
@@ -104,6 +105,7 @@ class AuthServiceProvider extends ServiceProvider
|
||||
StandaloneKeydb::class => DatabasePolicy::class,
|
||||
StandaloneDragonfly::class => DatabasePolicy::class,
|
||||
StandaloneClickhouse::class => DatabasePolicy::class,
|
||||
StandaloneSqlite::class => DatabasePolicy::class,
|
||||
|
||||
// Notification policies - all use the shared NotificationPolicy
|
||||
EmailNotificationSettings::class => NotificationPolicy::class,
|
||||
|
||||
Reference in New Issue
Block a user