diff --git a/module/common/model.php b/module/common/model.php index f3ccab9128..443cc5c95d 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -2205,6 +2205,8 @@ EOD; if(isset($this->app->user)) { + if(in_array($module, $this->config->programPriv->waterfall) and $this->app->tab == 'project') return true; + $this->app->user = $this->session->user; if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method); } diff --git a/module/design/control.php b/module/design/control.php index d783517a56..f68abb68d9 100644 --- a/module/design/control.php +++ b/module/design/control.php @@ -84,18 +84,27 @@ class design extends control $this->lang->TRActions .= html::a($this->createLink('design', 'submit', "productID=$productID", '', true), " {$this->lang->design->submit}", '', "class='btn btn-secondary iframe'"); $this->lang->TRActions .= ''; } - $this->lang->TRActions .= ''; + if(common::hasPriv('design', 'create')) $this->lang->TRActions .= '
  • ' . html::a($this->createLink('design', 'create', "projectID=$projectID&productID=$productID&type=$type"), $this->lang->design->create, '', "class='btn btn-link'") . '
  • '; + if(common::hasPriv('design', 'batchCreate')) $this->lang->TRActions .= '
  • ' . html::a($this->createLink('design', 'batchCreate', "projectID=$projectID&productID=$productID&type=$type"), $this->lang->design->batchCreate, '', "class='btn btn-link'") . '
  • '; + + $this->lang->TRActions .= ''; + $this->lang->TRActions .= ''; + $this->lang->TRActions .= ''; + } + else + { + if(common::hasPriv('design', 'create')) $this->lang->TRActions .= html::a(inlink('create', "projectID=$projectID&productID=$productID&type=$type"), " {$this->lang->design->create}", '', "class='btn btn-primary'"); + if(common::hasPriv('design', 'batchCreate')) $this->lang->TRActions .= html::a(inlink('batchCreate', "projectID=$projectID&productID=$productID&type=$type"), " {$this->lang->design->batchCreate}", '', "class='btn btn-primary'"); + } /* Init pager and get designs. */ $this->app->loadClass('pager', $static = true); diff --git a/module/design/view/browse.html.php b/module/design/view/browse.html.php index 5fb8fc535d..d080b42d5c 100644 --- a/module/design/view/browse.html.php +++ b/module/design/view/browse.html.php @@ -44,7 +44,7 @@ id);?> design->typeList, $design->type);?> - createLink('design', 'view', "id={$design->id}"), $design->name);?> + createLink('design', 'view', "id={$design->id}"), $design->name) : $design->name;?> createdBy);?> createdDate, 0, 11);?> design->printAssignedHtml($design, $users);?>