Ajout onglet password pour dbut gestion de modules de cryptages
This commit is contained in:
parent
2c6ad8afe4
commit
7b43abaa6b
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -51,7 +51,20 @@ if ($_GET["action"] == 'remove')
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_fiche_titre($langs->trans("DefaultRights"));
|
||||
|
||||
$h = 0;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
|
||||
$head[$h][1] = $langs->trans("DefaultRights");
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/security.php";
|
||||
$head[$h][1] = $langs->trans("Passwords");
|
||||
$h++;
|
||||
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Security"));
|
||||
|
||||
print $langs->trans("DefaultRightsDesc")."<br><br>\n";
|
||||
|
||||
@ -157,7 +170,8 @@ if ($result)
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
$db->close();
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -54,7 +54,7 @@ function llxHeader($head = "", $title="", $help_url='')
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/admin/triggers.php", $langs->trans("Triggers"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/admin/perms.php", $langs->trans("DefaultRights"));
|
||||
$menu->add(DOL_URL_ROOT."/admin/perms.php", $langs->trans("Security"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/admin/dict.php", $langs->trans("DictionnarySetup"));
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -21,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/user/admin/index.php
|
||||
\file htdocs/admin/security.php
|
||||
\ingroup setup
|
||||
\brief Page de configuration du module sécurité
|
||||
\version $Revision$
|
||||
@ -35,7 +34,9 @@ $langs->load("admin");
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
if ($_POST["action"] == 'update' || $_POST["action"] == 'add')
|
||||
{
|
||||
if (! dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],0,isset($_POST["constnote"])?$_POST["constnote"]:''))
|
||||
@ -50,21 +51,33 @@ if ($_POST["action"] == 'update' || $_POST["action"] == 'add')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
$h = 0;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
|
||||
$head[$h][1] = $langs->trans("DefaultRights");
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/security.php";
|
||||
$head[$h][1] = $langs->trans("Passwords");
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Security"));
|
||||
|
||||
|
||||
$var=false;
|
||||
|
||||
$form = new Form($db);
|
||||
$typeconst=array('yesno','texte','chaine');
|
||||
|
||||
print_titre($langs->trans("UserSetup"));
|
||||
|
||||
print "<br>";
|
||||
|
||||
print '<table class="noborder" width=\"100%\">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td><td>'.$langs->trans("Description").'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<form action="index.php" method="POST">';
|
||||
@ -72,24 +85,20 @@ print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="constname" value="USER_PASSWORD_GENERATED">';
|
||||
print '<input type="hidden" name="consttype" value="yesno">';
|
||||
|
||||
print '<tr '.$bc[$var]."><td>USER_PASSWORD_GENERATED</td>\n";
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("GeneratePassword").'</td>';
|
||||
|
||||
print '<td>';
|
||||
$form->selectyesnonum('constvalue',USER_PASSWORD_GENERATED);
|
||||
print '</td><td>';
|
||||
|
||||
print '<input type="text" size="40" name="constnote" value="'.stripslashes(nl2br($obj->note)).'">';
|
||||
print '</td><td>';
|
||||
print '<input type="submit" value="'.$langs->trans("Modify").'" name="button" class="button"> ';
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
|
||||
|
||||
print '</div>';
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
|
||||
@ -124,7 +124,7 @@ class MenuLeft {
|
||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/delais.php",$langs->trans("DelaysBeforeWarning"));
|
||||
|
||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/triggers.php", $langs->trans("Triggers"));
|
||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/perms.php", $langs->trans("DefaultRights"));
|
||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/perms.php", $langs->trans("Security"));
|
||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/dict.php", $langs->trans("DictionnarySetup"));
|
||||
if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/const.php", $langs->trans("OtherSetup"));
|
||||
|
||||
|
||||
@ -319,7 +319,7 @@ DelaysOfToleranceTransactionsToConciliate=Tol
|
||||
DelaysOfToleranceMembers=Tolérance de retard avant alerte (en jours) sur cotisations adhérents en retard
|
||||
##### Users setup #####
|
||||
UserGroupSetup=Users and groups module setup
|
||||
GeneratePassword=Générer mot de passe
|
||||
GeneratePassword=Suggest a generated password
|
||||
##### Company setup #####
|
||||
CompanySetup=Companies module setup
|
||||
CustomerCodeChecker=Module for checking customer's code
|
||||
|
||||
@ -319,7 +319,7 @@ DelaysOfToleranceTransactionsToConciliate=Tol
|
||||
DelaysOfToleranceMembers=Tolérance de retard avant alerte (en jours) sur cotisations adhérents en retard
|
||||
##### Users setup #####
|
||||
UserGroupSetup=Configuration module utilisateurs et groupes
|
||||
GeneratePassword=Générer mot de passe
|
||||
GeneratePassword=Proposer un mot de passe généré
|
||||
##### Company setup #####
|
||||
CompanySetup=Configuration du module Sociétés
|
||||
CustomerCodeChecker=Module de contrôle des codes clients
|
||||
|
||||
@ -1,65 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002,2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/user/pre.inc.php
|
||||
\brief Gestionnaire menu fichier users
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
|
||||
function llxHeader($head = "", $title = "")
|
||||
{
|
||||
global $user,$langs;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/user/home.php", $langs->trans("Users"));
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/user/", $langs->trans("List"));
|
||||
|
||||
if($user->admin)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/user/fiche.php?&action=create", $langs->trans("NewUser"));
|
||||
}
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/user/home.php", $langs->trans("Groups"));
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/user/group/", $langs->trans("List"));
|
||||
|
||||
if($user->admin)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/user/group/fiche.php?&action=create", $langs->trans("NewGroup"));
|
||||
}
|
||||
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
?>
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005 Regis Houssin <regis.houssin@cap-networks.com>
|
||||
* Copyright (C) 2005 Lionel COUSTEIX <etm_ltd@tiscali.co.uk>
|
||||
@ -312,8 +312,13 @@ if ($action == 'create')
|
||||
print '<tr><td valign="top">'.$langs->trans("Login").'</td>';
|
||||
print '<td class="valeur"><input size="20" maxsize="24" type="text" name="login" value=""></td></tr>';
|
||||
|
||||
$generated_password='';
|
||||
if ($conf->global->USER_PASSWORD_GENERATED)
|
||||
{
|
||||
$generated_passowrd='';
|
||||
}
|
||||
print '<tr><td valign="top">'.$langs->trans("Password").'</td>';
|
||||
print '<td class="valeur"><input size="30" maxsize="32" type="text" name="password" value=""></td></tr>';
|
||||
print '<td class="valeur"><input size="30" maxsize="32" type="text" name="password" value="'.$generated_password.'"></td></tr>';
|
||||
|
||||
if ($user->admin)
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -36,11 +36,12 @@ if (! $user->rights->user->user->lire && !$user->admin)
|
||||
$langs->load("users");
|
||||
|
||||
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
$lien="";
|
||||
if ($user->admin) $lien='<a href="'.DOL_URL_ROOT.'/user/admin/index.php">'.img_picto($langs->trans("Setup"),"setup").' '.$langs->trans("Setup").'</a>';
|
||||
if ($user->admin) $lien='<a href="'.DOL_URL_ROOT.'/admin/perms.php">'.img_picto($langs->trans("Setup"),"setup").' '.$langs->trans("Setup").'</a>';
|
||||
|
||||
print_fiche_titre($langs->trans("MenuUsersAndGroups"),$lien);
|
||||
|
||||
@ -49,11 +50,7 @@ print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||
|
||||
print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Recherche User
|
||||
*/
|
||||
// Recherche User
|
||||
$var=false;
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/user/index.php">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
@ -64,9 +61,7 @@ print '<tr '.$bc[$var].'><td nowrap>'.$langs->trans("Other").':</td><td><input t
|
||||
print "</table><br>\n";
|
||||
print '</form>';
|
||||
|
||||
/*
|
||||
* Recherche Group
|
||||
*/
|
||||
// Recherche Group
|
||||
$var=false;
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/user/group/index.php">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user