You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
473 B
24 lines
473 B
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\User;
|
|
use App\Couple;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
|
|
class CouplePolicy
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
/**
|
|
* Determine whether the user can edit the couple.
|
|
*
|
|
* @param \App\User $user
|
|
* @param \App\Couple $couple
|
|
* @return mixed
|
|
*/
|
|
public function edit(User $user, Couple $couple)
|
|
{
|
|
return $couple->manager_id == $user->id || is_system_admin($user);
|
|
}
|
|
}
|