diff --git a/module/execution/control.php b/module/execution/control.php index 5068b485e1..22b35d12db 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -41,11 +41,15 @@ class execution extends control $this->loadModel('project'); if(defined('IN_UPGRADE') and IN_UPGRADE) return false; - $this->executions = $this->execution->getPairs(0, 'all', 'nocode'); - $skipCreateStep = array('computeburn', 'ajaxgetdropmenu', 'executionkanban', 'ajaxgetteammembers', 'all'); - if(!in_array($this->methodName, $skipCreateStep) and $this->app->tab == 'execution') + + if(isset($this->app->user)) { - if(!$this->executions and $this->methodName != 'index' and $this->methodName != 'create' and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('execution', 'create')); + $this->executions = $this->execution->getPairs(0, 'all', 'nocode'); + $skipCreateStep = array('computeburn', 'ajaxgetdropmenu', 'executionkanban', 'ajaxgetteammembers', 'all'); + if(!in_array($this->methodName, $skipCreateStep) and $this->app->tab == 'execution') + { + if(!$this->executions and $this->methodName != 'index' and $this->methodName != 'create' and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('execution', 'create')); + } } }