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