Do not check whether we are a super user

refs #7163
This commit is contained in:
Johannes Meyer 2014-11-07 15:33:40 +01:00
parent f1b6a82387
commit 004ac04de6
1 changed files with 0 additions and 20 deletions

View File

@ -47,11 +47,6 @@ class SetupCommand extends Command
*/
public function generateTokenAction()
{
if (false === $this->isSuperUser()) {
$this->fail($this->translate('This action needs to be run as super user in order to work properly!'));
return false;
}
$token = bin2hex(openssl_random_pseudo_bytes(8));
$filepath = $this->app->getConfigDir() . '/setup.token';
@ -89,11 +84,6 @@ class SetupCommand extends Command
*/
public function createConfigDirectoryAction()
{
if (false === $this->isSuperUser()) {
$this->fail($this->translate('This action needs to be run as super user in order to work properly!'));
return false;
}
$group = $this->params->getStandalone();
if ($group === null) {
$this->fail($this->translate('The `group\' argument is mandatory.'));
@ -119,14 +109,4 @@ class SetupCommand extends Command
printf($this->translate("Successfully created configuration directory at: %s\n"), $path);
}
/**
* Return whether the current user is a super user
*
* @return bool
*/
protected function isSuperUser()
{
return intval(shell_exec('echo $EUID')) === 0;
}
}