/** * Configures one setting * * @access protected * @param string $path * @param string $value */ protected function configureSetting($path, $value) { $newValue = $this->cliHelper->inputText('Please enter the value for "' . $path . '":', $value); if ($newValue === $value) { return; } $this->configurationManager->setSetting($path, $newValue); }
/** * Execute the installation the access control module * * @access public * @param \Zepi\Turbo\Framework $framework * @param \Zepi\Turbo\Request\CliRequest $request * @param \Zepi\Turbo\Response\Response $response */ public function execute(Framework $framework, CliRequest $request, Response $response) { // Execute the installer only if there are no users $dataRequest = new \Zepi\DataSource\Core\Entity\DataRequest(1, 0, 'name', 'ASC'); if ($this->userManager->count($dataRequest) > 0) { return; } $username = ''; while ($username === '') { $username = trim($this->cliHelper->inputText('Please enter the username for the super-admin user:'******''; while ($password === '') { $password = trim($this->cliHelper->inputText('Please enter the password for the super-admin user:'******'', '', $username, '', array()); $user->setNewPassword($password); // Save the super-admin user $user = $this->userManager->addUser($user); // Add the super-admin access level $this->accessControlManager->grantPermission($user->getUuid(), '\\Zepi\\Web\\AccessControl\\Entity\\User', '\\Global\\*', 'CLI'); }