* Fix bug#16424,#20555.

This commit is contained in:
xieqiyu
2022-03-10 10:32:41 +08:00
parent 9fb53de457
commit e8a7995351
3 changed files with 22 additions and 11 deletions

View File

@@ -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);
}

View File

@@ -84,18 +84,27 @@ class design extends control
$this->lang->TRActions .= html::a($this->createLink('design', 'submit', "productID=$productID", '', true), "<i class='icon-plus'></i> {$this->lang->design->submit}", '', "class='btn btn-secondary iframe'");
$this->lang->TRActions .= '</div>';
}
$this->lang->TRActions .= '<div class="btn-group dropdown">';
$this->lang->TRActions .= html::a(inlink('create', "projectID=$projectID&productID=$productID&type=$type"), "<i class='icon-plus'></i> {$this->lang->design->create}", '', "class='btn btn-primary'");
$this->lang->TRActions .= "<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span>";
$this->lang->TRActions .= '</button>';
$this->lang->TRActions .= "<ul class='dropdown-menu pull-right' id='createActionMenu'>";
if(common::hasPriv('design', 'create')) $this->lang->TRActions .= '<li>' . html::a($this->createLink('design', 'create', "projectID=$projectID&productID=$productID&type=$type"), $this->lang->design->create, '', "class='btn btn-link'") . '</li>';
if(common::hasPriv('design', 'batchCreate')) $this->lang->TRActions .= '<li>' . html::a($this->createLink('design', 'batchCreate', "projectID=$projectID&productID=$productID&type=$type"), $this->lang->design->batchCreate, '', "class='btn btn-link'") . '</li>';
if(common::hasPriv('design', 'create') and common::hasPriv('design', 'batchCreate'))
{
$this->lang->TRActions .= '<div class="btn-group dropdown">';
$this->lang->TRActions .= html::a(inlink('create', "projectID=$projectID&productID=$productID&type=$type"), "<i class='icon-plus'></i> {$this->lang->design->create}", '', "class='btn btn-primary'");
$this->lang->TRActions .= "<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span>";
$this->lang->TRActions .= '</button>';
$this->lang->TRActions .= "<ul class='dropdown-menu pull-right' id='createActionMenu'>";
$this->lang->TRActions .= '</ul>';
$this->lang->TRActions .= '</div>';
$this->lang->TRActions .= '</div>';
if(common::hasPriv('design', 'create')) $this->lang->TRActions .= '<li>' . html::a($this->createLink('design', 'create', "projectID=$projectID&productID=$productID&type=$type"), $this->lang->design->create, '', "class='btn btn-link'") . '</li>';
if(common::hasPriv('design', 'batchCreate')) $this->lang->TRActions .= '<li>' . html::a($this->createLink('design', 'batchCreate', "projectID=$projectID&productID=$productID&type=$type"), $this->lang->design->batchCreate, '', "class='btn btn-link'") . '</li>';
$this->lang->TRActions .= '</ul>';
$this->lang->TRActions .= '</div>';
$this->lang->TRActions .= '</div>';
}
else
{
if(common::hasPriv('design', 'create')) $this->lang->TRActions .= html::a(inlink('create', "projectID=$projectID&productID=$productID&type=$type"), "<i class='icon-plus'></i> {$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"), "<i class='icon-plus'></i> {$this->lang->design->batchCreate}", '', "class='btn btn-primary'");
}
/* Init pager and get designs. */
$this->app->loadClass('pager', $static = true);

View File

@@ -44,7 +44,7 @@
<tr>
<td calss="c-id"> <?php printf('%03d', $design->id);?></td>
<td class="c-type"> <?php echo zget($lang->design->typeList, $design->type);?></td>
<td class="c-name" title="<?php echo $design->name;?>"><?php echo html::a($this->createLink('design', 'view', "id={$design->id}"), $design->name);?></td>
<td class="c-name" title="<?php echo $design->name;?>"><?php echo common::hasPriv('design', 'view') ? html::a($this->createLink('design', 'view', "id={$design->id}"), $design->name) : $design->name;?></td>
<td class="c-createdBy"> <?php echo zget($users, $design->createdBy);?></td>
<td class="c-createdDate"><?php echo substr($design->createdDate, 0, 11);?></td>
<td class="c-assignedTo"> <?php echo $this->design->printAssignedHtml($design, $users);?></td>