first commit
This commit is contained in:
41
app/Policies/InvitationPolicy.php
Normal file
41
app/Policies/InvitationPolicy.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
use App\Models\User;
|
||||
|
||||
class InvitationPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function before(User $user): ?bool
|
||||
{
|
||||
return $user->isAdmin() ?: null;
|
||||
}
|
||||
|
||||
public function view(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function viewAny(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function create(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function update(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function destroy(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user