From 869c1c019c66486df71d650ad1250f91fba16130 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 4 Nov 2015 10:49:20 +0100 Subject: [PATCH] =?UTF-8?q?Task=20#1205=20-=20CFGSEC=20:s=C3=A9curit=C3=A9?= =?UTF-8?q?=20#1205=20:=20CFGSEC=20button=20to=20set=20access?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/param_sec.inc.php | 64 +++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 12 deletions(-) diff --git a/include/param_sec.inc.php b/include/param_sec.inc.php index 675e478dc..9ac3b8b47 100644 --- a/include/param_sec.inc.php +++ b/include/param_sec.inc.php @@ -206,11 +206,11 @@ if ( $action == "view" ) $admin=0; $access=$User->get_folder_access($gDossier); - $str="Aucun accès"; + $str=_("Aucun accès"); if ($access=='R') { - $str=' Utilisateur normal'; + $str=_(' Utilisateur normal'); } if ( $User->admin==1 ) @@ -224,10 +224,13 @@ if ( $action == "view" ) if ( $_GET['user_id'] == 1 ) { - echo '

Cet utilisateur est administrateur, il a tous les droits

'; - echo "

Impossible de modifier cet utilisateur dans cet écran, il faut passer par - l'écran administration -> utilisateur. -

"; + echo '

'. + _("Cet utilisateur est administrateur, il a tous les droits"). + '

'; + echo "

". + _("Impossible de modifier cet utilisateur dans cet écran, il faut passer par + l'écran administration -> utilisateur."). + "

"; echo $return; return; } @@ -235,11 +238,13 @@ if ( $action == "view" ) // Check if the user can access that folder if ( $access == 'X' ) { - echo "

L'utilisateur n'a pas accès à ce dossier

"; - echo "

Impossible de modifier cet utilisateur dans cet écran, il faut passer par - l'écran administration -> utilisateur. -

"; - echo $return; + echo "

" + ._("L'utilisateur n'a pas accès à ce dossier")."

"; + echo "

". + _("Impossible de modifier cet utilisateur dans cet écran, il faut passer par + l'écran administration -> utilisateur."). + "

"; + echo $return; $action=""; return; } @@ -270,6 +275,9 @@ if ( $action == "view" ) echo _("Profil")." ".$i_profile->input(); echo "

"; echo '
Journaux '; + echo HtmlInput::button("grant_all", _("Accès à tout"), " onclick=\" grant_ledgers ('W') \""); + echo HtmlInput::button("grant_readonly", _("Uniquement Lecture"), " onclick=\" grant_ledgers ('R') \""); + echo HtmlInput::button("revoke_all", _("Aucun accès"), " onclick=\" grant_ledgers ('X') \""); echo ''; $MaxJrn=Database::num_row($Res); $jrn_priv=new ISelect(); @@ -278,7 +286,7 @@ if ( $action == "view" ) array ('value'=>'W','label'=>'Lecture et écriture'), array ('value'=>'X','label'=>'Aucun accès') ); - + for ( $i =0 ; $i < $MaxJrn; $i++ ) { /* set the widget */ @@ -309,6 +317,8 @@ if ( $action == "view" ) // Show Priv. for actions //********************************************************************** echo '
Actions '; + echo HtmlInput::button("grant_all_action", _("Toutes les actions"), " onclick=\" grant_action(1) \""); + echo HtmlInput::button("revoke_all_action", _("Aucune action"), " onclick=\" grant_action (0) \""); include(NOALYSS_INCLUDE.'/template/security_list_action.php'); echo '
'; echo HtmlInput::button('Imprime','imprime',"onclick=\"window.open('".$sHref."');\""); @@ -316,6 +326,36 @@ if ( $action == "view" ) echo HtmlInput::reset('Annule'); echo $return; echo ''; + ?> + +"; html_page_stop();