diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index f45b2b155fd..5bb953c3a9d 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -261,15 +261,18 @@ print '
| '.$langs->trans("Module").' | '; -if ($caneditperms && empty($objMod->rights_admin_allowed) || empty($object->admin)) +if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->admin)) { - print ''; - print 'id.'&action=addrights&entity='.$entity.'&module=allmodules">'.$langs->trans("All").""; - print '/'; - print 'id.'&action=delrights&entity='.$entity.'&module=allmodules">'.$langs->trans("None").""; - print ' | '; + if ($caneditperms) + { + print ''; + print 'id.'&action=addrights&entity='.$entity.'&module=allmodules">'.$langs->trans("All").""; + print '/'; + print 'id.'&action=delrights&entity='.$entity.'&module=allmodules">'.$langs->trans("None").""; + print ' | '; + } + print ''; } -print ' | '; print ' | '.$langs->trans("Permissions").' | '; print '
| '.img_object('',$picto,'class="pictoobjectwidth"').' '.$objMod->getName().' | '; // Permission and tick @@ -383,6 +386,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 ''.$permlabel.' | ';