From c509647ccb226e72b333556f3982ec53f03583c3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Jun 2006 22:26:23 +0000 Subject: [PATCH] Fix: Si on a droit de modifier mot de passe on ne doit pas pour autant avoir droit de modifier autre info --- htdocs/user.class.php | 6 +++--- mysql/migration/2.0.0-2.1.0.sql | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/user.class.php b/htdocs/user.class.php index 390bc1fd353..88ad673e225 100644 --- a/htdocs/user.class.php +++ b/htdocs/user.class.php @@ -759,10 +759,10 @@ class User $this->email=trim($this->email); $this->note=trim($this->note); $this->admin=$this->admin?$this->admin:0; - - $error=0; - if (!strlen($this->code)) $this->code = $this->login; + + dolibarr_syslog("User::update nom=".$this->nom.", prenom=".$this->prenom); + $error=0; $sql = "UPDATE ".MAIN_DB_PREFIX."user SET "; $sql .= " name = '".addslashes($this->nom)."'"; diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql index faecf7107df..d33a0cc88ce 100644 --- a/mysql/migration/2.0.0-2.1.0.sql +++ b/mysql/migration/2.0.0-2.1.0.sql @@ -282,6 +282,7 @@ alter table llx_accountingsystem_det rename to llx_accountingaccount; insert into llx_rights_def (id, libelle, module, type, bydefault, subperms, perms) values (262,'Consulter tous les clients','commercial','r',1,'voir','client'); insert into llx_user_rights(fk_user,fk_id) select distinct fk_user, '262' from llx_user_rights where fk_id = 261; +update llx_rights_def set subperms='creer' where subperms='supprimer' AND module='user' AND perms='self' AND id=255; alter table llx_commandedet add column rang integer DEFAULT 0; alter table llx_propaldet add column rang integer DEFAULT 0;