mirror of
https://github.com/tiennm99/coolify.git
synced 2026-09-20 04:23:16 +00:00
feat: add validation methods for S3 bucket names, paths, and server paths; update import logic to prevent command injection
This commit is contained in:
1 parent
6c030d96f2
commit
9113ed714f
9 files changed
+272
-55
No files matched your search
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\InstanceSettings;
|
||||
use App\Models\User;
|
||||
|
||||
class InstanceSettingsPolicy
|
||||
{
|
||||
/**
|
||||
* Determine whether the user can view the instance settings.
|
||||
*/
|
||||
public function view(User $user, InstanceSettings $settings): bool
|
||||
{
|
||||
return isInstanceAdmin();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can update the instance settings.
|
||||
*/
|
||||
public function update(User $user, InstanceSettings $settings): bool
|
||||
{
|
||||
return isInstanceAdmin();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user