* adjust task #49362 and check priv.
This commit is contained in:
@@ -10,7 +10,7 @@ $('#pageNav .btn-group #dropMenu .table-col .list-group a[href*="showFiles"]').r
|
||||
</script>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if(!empty($doc) and !$doc->deleted and $doc->version > 1 and common::hasPriv('doc', 'diff')):?>
|
||||
<?php if(!empty($doc) and !$doc->deleted and $doc->version > 1 and common::hasPriv('doc', 'diff') and $config->edition != 'open'):?>
|
||||
<?php
|
||||
$versions = array();
|
||||
$i = 1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
$('#mainMenu .btn-toolbar > a[href*="bug"], a[href*="testtask"], a[href*="testcase"], a[href*="issue"], a[href*="risk"], a[href*="requirement"]').remove();
|
||||
<?php if($this->config->edition != 'open'):?>
|
||||
$('#mainMenu .btn-toolbar > a:first').attr('href', createLink('user', 'todocalendar', 'userID=<?php echo $user->id?>'));
|
||||
<?php if($this->config->edition != 'open' and common::hasPriv('user', 'todocalendar')):?>
|
||||
$('#mainMenu .btn-toolbar > a:first[href*="todo"]').attr('href', createLink('user', 'todocalendar', 'userID=<?php echo $user->id?>'));
|
||||
<?php endif;?>
|
||||
</script>
|
||||
|
||||
@@ -516,12 +516,15 @@ class docModel extends model
|
||||
/* When file change then version add one. */
|
||||
$files = $this->loadModel('file')->getByObject('doc', $docID);
|
||||
$docFiles = array();
|
||||
foreach($files as $file)
|
||||
if($docContent)
|
||||
{
|
||||
$pathName = $this->file->getRealPathName($file->pathname);
|
||||
$file->webPath = $this->file->webPath . $pathName;
|
||||
$file->realPath = $this->file->savePath . $pathName;
|
||||
if(strpos(",{$docContent->files},", ",{$file->id},") !== false) $docFiles[$file->id] = $file;
|
||||
foreach($files as $file)
|
||||
{
|
||||
$pathName = $this->file->getRealPathName($file->pathname);
|
||||
$file->webPath = $this->file->webPath . $pathName;
|
||||
$file->realPath = $this->file->savePath . $pathName;
|
||||
if(strpos(",{$docContent->files},", ",{$file->id},") !== false) $docFiles[$file->id] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check file change. */
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
if(common::hasPriv('user', 'view'))
|
||||
if(common::hasPriv('user', 'view') and common::hasPriv('my', 'team'))
|
||||
{
|
||||
$link = isset($deptUsers[$member->userID]) ? $this->createLink('user', 'view', "userID={$member->userID}") : "javascript: alert(noAccess);";
|
||||
echo html::a($link, $member->realname, '', 'data-app="system"');
|
||||
|
||||
Reference in New Issue
Block a user