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