Merge pull request #12600 from TobiasSekan/FixEcmSymbolsAccess
Fix shown ECM symbols on missing access
This commit is contained in:
commit
8f39fec121
@ -289,25 +289,49 @@ if ($type == 'directory')
|
|||||||
}
|
}
|
||||||
else $textifempty=($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection"));
|
else $textifempty=($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection"));
|
||||||
|
|
||||||
if ($module == 'medias')
|
if ($module == 'medias')
|
||||||
{
|
{
|
||||||
$useinecm = 6;
|
$useinecm = 6;
|
||||||
$modulepart='medias';
|
$modulepart='medias';
|
||||||
$perm=($user->rights->website->write || $user->rights->emailing->creer);
|
$perm=($user->rights->website->write || $user->rights->emailing->creer);
|
||||||
$title='none';
|
$title='none';
|
||||||
}
|
}
|
||||||
else
|
elseif($module == 'ecm') // DMS/ECM -> manual structure
|
||||||
{
|
{
|
||||||
$useinecm = 5;
|
if($user->rights->ecm->read)
|
||||||
$modulepart='ecm';
|
{
|
||||||
$perm=$user->rights->ecm->upload;
|
// Buttons: Preview
|
||||||
$title=''; // Use default
|
$useinecm = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// When we show list of files for ECM files, $filearray contains file list, and directory is defined with modulepart + section into $param
|
if($user->rights->ecm->upload)
|
||||||
// When we show list of files for a directory, $filearray ciontains file list, and directory is defined with modulepart + $relativepath
|
{
|
||||||
//var_dump("title=".$title." modulepart=".$modulepart." useinecm=".$useinecm." perm=".$perm." relativepath=".$relativepath." param=".$param." url=".$url);
|
// Buttons: Preview + Delete
|
||||||
$formfile->list_of_documents($filearray, '', $modulepart, $param, 1, $relativepath, $perm, $useinecm, $textifempty, $maxlengthname, $title, $url, 0, $perm);
|
$useinecm = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($user->rights->ecm->setup)
|
||||||
|
{
|
||||||
|
// Buttons: Preview + Delete + Edit
|
||||||
|
$useinecm = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
$perm=$user->rights->ecm->upload;
|
||||||
|
$modulepart='ecm';
|
||||||
|
$title=''; // Use default
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$useinecm = 5;
|
||||||
|
$modulepart='ecm';
|
||||||
|
$perm=$user->rights->ecm->upload;
|
||||||
|
$title=''; // Use default
|
||||||
|
}
|
||||||
|
|
||||||
|
// When we show list of files for ECM files, $filearray contains file list, and directory is defined with modulepart + section into $param
|
||||||
|
// When we show list of files for a directory, $filearray ciontains file list, and directory is defined with modulepart + $relativepath
|
||||||
|
//var_dump("title=".$title." modulepart=".$modulepart." useinecm=".$useinecm." perm=".$perm." relativepath=".$relativepath." param=".$param." url=".$url);
|
||||||
|
$formfile->list_of_documents($filearray, '', $modulepart, $param, 1, $relativepath, $perm, $useinecm, $textifempty, $maxlengthname, $title, $url, 0, $perm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user