is($this->model->owner())) { return true; } if ($authUser->canDo('aml.sanction.action.copy')) { return true; } return false; } /** * Determine if the given user can approve the given sanction. * * @param UserPolicyInterface $authUser * * @return bool */ function empty(UserPolicyInterface $authUser, Sanction $sanction) { if ($authUser->is($this->model->owner())) { return true; } if ($authUser->canDo('aml.sanction.action.empty')) { return true; } return false; } /** * Determine if the given user can approve the given sanction. * * @param UserPolicyInterface $authUser * * @return bool */ public function transfer(UserPolicyInterface $authUser, Sanction $sanction) { if ($authUser->is($this->model->owner())) { return true; } if ($authUser->canDo('aml.sanction.action.transfer')) { return true; } return false; } /** * Determine if the given user can approve the given sanction. * * @param UserPolicyInterface $authUser * * @return bool */ public function delete(UserPolicyInterface $authUser, Sanction $sanction) { if ($authUser->canDo('aml.sanction.action.delete')) { return true; } return false; } }