Added the ability to manage a group of users.

This commit is contained in:
2023-07-16 19:21:09 +06:00
parent ba7e52f8ac
commit 4083e2ec5e
45 changed files with 1173 additions and 10 deletions

24
app/Policies/Policy.php Normal file
View File

@@ -0,0 +1,24 @@
<?php declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
abstract readonly class Policy
{
use HandlesAuthorization;
/**
* @param User $user
* @return bool|null
*/
final public function before(User $user): ?bool
{
if ($user->is_admin) {
return true;
}
return null;
}
}