Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_mc
This commit is contained in:
commit
2bc25fc008
@ -1731,7 +1731,7 @@ function email_admin_prepare_head()
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
if ($user->admin && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates'))
|
||||
if (! empty($user->admin) && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates'))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/mails.php";
|
||||
$head[$h][1] = $langs->trans("OutGoingEmailSetup");
|
||||
@ -1752,7 +1752,7 @@ function email_admin_prepare_head()
|
||||
$head[$h][2] = 'templates';
|
||||
$h++;
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 1 && ! empty($user->admin) && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates'))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/mails_senderprofile_list.php";
|
||||
$head[$h][1] = $langs->trans("EmailSenderProfiles");
|
||||
|
||||
@ -55,7 +55,7 @@ ALTER TABLE llx_product_fournisseur_price ADD COLUMN desc_fourn text after ref_f
|
||||
ALTER TABLE llx_user ADD COLUMN dateemploymentend date after dateemployment;
|
||||
|
||||
ALTER TABLE llx_stock_mouvement ADD COLUMN fk_project integer;
|
||||
Alter tABLE llx_c_action_trigger MODIFY COLUMN elementtype varchar(32)
|
||||
ALTER TABLE llx_c_action_trigger MODIFY COLUMN elementtype varchar(32);
|
||||
ALTER TABLE llx_c_field_list ADD COLUMN visible tinyint DEFAULT 1 NOT NULL AFTER search;
|
||||
|
||||
|
||||
|
||||
@ -261,15 +261,18 @@ print '<div class="div-table-responsive">';
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Module").'</td>';
|
||||
if ($caneditperms && empty($objMod->rights_admin_allowed) || empty($object->admin))
|
||||
if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->admin))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addrights&entity='.$entity.'&module=allmodules">'.$langs->trans("All")."</a>";
|
||||
print '/';
|
||||
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delrights&entity='.$entity.'&module=allmodules">'.$langs->trans("None")."</a>";
|
||||
print '</td>';
|
||||
if ($caneditperms)
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addrights&entity='.$entity.'&module=allmodules">'.$langs->trans("All")."</a>";
|
||||
print '/';
|
||||
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delrights&entity='.$entity.'&module=allmodules">'.$langs->trans("None")."</a>";
|
||||
print '</td>';
|
||||
}
|
||||
print '<td align="center" width="24"> </td>';
|
||||
}
|
||||
print '<td align="center" width="24"> </td>';
|
||||
print '<td>'.$langs->trans("Permissions").'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
@ -310,21 +313,31 @@ if ($result)
|
||||
print '<tr class="oddeven trforbreak">';
|
||||
print '<td class="maxwidthonsmartphone tdoverflowonsmartphone">'.img_object('',$picto,'class="pictoobjectwidth"').' '.$objMod->getName();
|
||||
print '<a name="'.$objMod->getName().'"></a></td>';
|
||||
print '<td align="center" class="nowrap">';
|
||||
if ($caneditperms && empty($objMod->rights_admin_allowed) || empty($object->admin))
|
||||
if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->admin))
|
||||
{
|
||||
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addrights&entity='.$entity.'&module='.$obj->module.'">'.$langs->trans("All")."</a>";
|
||||
print '/';
|
||||
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delrights&entity='.$entity.'&module='.$obj->module.'">'.$langs->trans("None")."</a>";
|
||||
if ($caneditperms)
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addrights&entity='.$entity.'&module='.$obj->module.'">'.$langs->trans("All")."</a>";
|
||||
print '/';
|
||||
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delrights&entity='.$entity.'&module='.$obj->module.'">'.$langs->trans("None")."</a>";
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($caneditperms)
|
||||
{
|
||||
print '<td></td>';
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print '<td colspan="2"> </td>';
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Picto and label of permission
|
||||
// Picto and label of module
|
||||
print '<td class="maxwidthonsmartphone tdoverflowonsmartphone">'.img_object('',$picto,'class="pictoobjectwidth"').' '.$objMod->getName().'</td>';
|
||||
|
||||
// Permission and tick
|
||||
@ -383,6 +396,7 @@ if ($result)
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
// Label
|
||||
$permlabel=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$langs->trans($obj->libelle)));
|
||||
print '<td class="maxwidthonsmartphone">'.$permlabel.'</td>';
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';
|
||||
|
||||
$langs->loadLangs(array("admin","other","website"));
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
if (! $user->rights->website->read) accessforbidden();
|
||||
|
||||
if (! ((GETPOST('testmenuhider','int') || ! empty($conf->global->MAIN_TESTMENUHIDER)) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user