From 004ac04de62f8d61baff1e00cf4da7cf5664f096 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 7 Nov 2014 15:33:40 +0100 Subject: [PATCH] Do not check whether we are a super user refs #7163 --- application/clicommands/SetupCommand.php | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/application/clicommands/SetupCommand.php b/application/clicommands/SetupCommand.php index 8f87699ef..c204b226b 100644 --- a/application/clicommands/SetupCommand.php +++ b/application/clicommands/SetupCommand.php @@ -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; - } }