26 lines
512 B
PHP
26 lines
512 B
PHP
<?php
|
|
|
|
namespace App\Modules\FilamentPermission\Repositories;
|
|
|
|
class FilamentPermissionRepository
|
|
{
|
|
public static function hiddenOnCreate(string $context): bool
|
|
{
|
|
return $context === 'create';
|
|
}
|
|
|
|
public static function forClients(): bool
|
|
{
|
|
return ! user()->isSystemUser();
|
|
}
|
|
|
|
public static function defaultSystemInput(string $context): bool
|
|
{
|
|
if (user()->isSystemUser()) {
|
|
return false;
|
|
}
|
|
|
|
return $context === 'create';
|
|
}
|
|
}
|