DONE: layout letter with letterhead and footer, notification for newly...
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\User\Policies;
|
||||
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
use Modules\User\Entities\Address;
|
||||
|
||||
class AddressPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
public function viewAny($user): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function view($user, ?Address $address = null): bool
|
||||
{
|
||||
return $address === null || $address->user_id === $user->id;
|
||||
}
|
||||
|
||||
public function create($user): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function update($user, ?Address $address = null): bool
|
||||
{
|
||||
return $address === null || $address->user_id === $user->id;
|
||||
}
|
||||
|
||||
public function deleteAny($user): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function delete($user, ?Address $address = null): bool
|
||||
{
|
||||
return $address === null || $address->user_id === $user->id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user