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