diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 0c9a43d5ca9..9d3bc24bd76 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -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"); diff --git a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql index 996fdb79b17..0c9498fb594 100644 --- a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql +++ b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql @@ -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; diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index f45b2b155fd..17666183319 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -261,15 +261,18 @@ print '
'; print ''; print ''; print ''; -if ($caneditperms && empty($objMod->rights_admin_allowed) || empty($object->admin)) +if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->admin)) { - print ''; + if ($caneditperms) + { + print ''; + } + print ''; } -print ''; print ''; print ''."\n"; @@ -310,21 +313,31 @@ if ($result) print ''; print ''; - print ''; + } + } + else + { + if ($caneditperms) + { + print ''; + } } - print ''; print ''; print ''."\n"; } print ''; - // Picto and label of permission + // Picto and label of module print ''; // Permission and tick @@ -383,6 +396,7 @@ if ($result) print ''; } + // 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 ''; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 71b71e241a1..d64849ddc9b 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -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))) {
'.$langs->trans("Module").''; - print ''.$langs->trans("All").""; - print '/'; - print ''.$langs->trans("None").""; - print ''; + print ''.$langs->trans("All").""; + print '/'; + print ''.$langs->trans("None").""; + print '  '.$langs->trans("Permissions").'
'.img_object('',$picto,'class="pictoobjectwidth"').' '.$objMod->getName(); print ''; - if ($caneditperms && empty($objMod->rights_admin_allowed) || empty($object->admin)) + if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->admin)) { - print 'module.'">'.$langs->trans("All").""; - print '/'; - print 'module.'">'.$langs->trans("None").""; + if ($caneditperms) + { + print ''; + print 'module.'">'.$langs->trans("All").""; + print '/'; + print 'module.'">'.$langs->trans("None").""; + print ' 
'.img_object('',$picto,'class="pictoobjectwidth"').' '.$objMod->getName().' '.$permlabel.'