diff --git a/htdocs/includes/modules/modUser.class.php b/htdocs/includes/modules/modUser.class.php index ee43307961d..e787444f76d 100644 --- a/htdocs/includes/modules/modUser.class.php +++ b/htdocs/includes/modules/modUser.class.php @@ -92,7 +92,7 @@ class modUser extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'user'; $this->rights[$r][5] = 'lire'; - + $r++; $this->rights[$r][0] = 252; $this->rights[$r][1] = 'Consulter les permissions des autres utilisateurs'; @@ -100,7 +100,7 @@ class modUser extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'user'; $this->rights[$r][5] = 'readperms'; - + $r++; $this->rights[$r][0] = 253; $this->rights[$r][1] = 'Creer/modifier les autres utilisateurs et leurs permissions'; @@ -108,7 +108,7 @@ class modUser extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'user'; $this->rights[$r][5] = 'creer'; - + $r++; $this->rights[$r][0] = 254; $this->rights[$r][1] = 'Modifier le mot de passe des autres utilisateurs'; @@ -124,7 +124,8 @@ class modUser extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'user'; $this->rights[$r][5] = 'supprimer'; - + + /* Removed useless permission $r++; $this->rights[$r][0] = 256; $this->rights[$r][1] = 'Consulter ses propres permissions'; @@ -132,7 +133,8 @@ class modUser extends DolibarrModules $this->rights[$r][3] = 1; $this->rights[$r][4] = 'self'; $this->rights[$r][5] = 'readperms'; - + */ + $r++; $this->rights[$r][0] = 257; $this->rights[$r][1] = 'Creer/modifier ses propres infos utilisateur'; @@ -148,7 +150,8 @@ class modUser extends DolibarrModules $this->rights[$r][3] = 1; $this->rights[$r][4] = 'self'; $this->rights[$r][5] = 'password'; - + + /* Removed useless permission $r++; $this->rights[$r][0] = 259; $this->rights[$r][1] = 'Modifier ses propres permissions'; @@ -156,7 +159,8 @@ class modUser extends DolibarrModules $this->rights[$r][3] = 1; $this->rights[$r][4] = 'self'; $this->rights[$r][5] = 'writeperms'; - + */ + $r++; $this->rights[$r][0] = 351; $this->rights[$r][1] = 'Consulter les groupes'; @@ -164,7 +168,7 @@ class modUser extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'group'; $this->rights[$r][5] = 'read'; - + $r++; $this->rights[$r][0] = 352; $this->rights[$r][1] = 'Consulter les permissions des groupes'; @@ -172,7 +176,7 @@ class modUser extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'group'; $this->rights[$r][5] = 'readperms'; - + $r++; $this->rights[$r][0] = 353; $this->rights[$r][1] = 'Creer/modifier les groupes et leurs permissions'; @@ -180,7 +184,7 @@ class modUser extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'group'; $this->rights[$r][5] = 'write'; - + $r++; $this->rights[$r][0] = 354; $this->rights[$r][1] = 'Supprimer ou desactiver les groupes'; diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index d5401c56c13..c1eadf84fd3 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -519,10 +519,8 @@ Permission252= Consulter les permissions des autres utilisateurs Permission253= Créer/modifier les autres utilisateurs et leurs permissions Permission254= Modifier le mot de passe des autres utilisateurs Permission255= Supprimer ou désactiver les autres utilisateurs -Permission256= Consulter ses propres permissions Permission257= Créer/modifier ses propres infos utilisateur Permission258= Modifier son propre mot de passe -Permission259= Modifier ses propres permissions Permission262= Étendre l'accès à tous les tiers (Pas seulement ceux liés à l'utilisateur). Non effectif pour utilisateurs externes (toujours limité à eux-même). Permission271= Consulter le CA Permission272= Consulter les factures diff --git a/htdocs/lib/usergroups.lib.php b/htdocs/lib/usergroups.lib.php index bc7cf0bc44a..bb0d4d51a8c 100644 --- a/htdocs/lib/usergroups.lib.php +++ b/htdocs/lib/usergroups.lib.php @@ -27,10 +27,10 @@ function user_prepare_head($object) { global $langs, $conf, $user; - + $langs->load("users"); - - $canreadperms=($user->admin || ($user->id != $object->id && $user->rights->user->user->readperms) || ($user->id == $object->id && $user->rights->user->self->readperms)); + + $canreadperms=($user->admin || ($user->id != $object->id && $user->rights->user->user->readperms) || ($user->id == $object->id)); $h = 0; $head = array(); @@ -48,7 +48,7 @@ function user_prepare_head($object) $head[$h][2] = 'ldap'; $h++; } - + if ($canreadperms) { $head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$object->id; @@ -76,13 +76,13 @@ function user_prepare_head($object) $head[$h][1] = $langs->trans("Note"); $head[$h][2] = 'note'; $h++; - + $head[$h][0] = DOL_URL_ROOT.'/user/info.php?id='.$object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; } - + // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__'); @@ -107,7 +107,7 @@ function user_prepare_head($object) function group_prepare_head($object) { global $langs, $conf, $user; - + $canreadperms=($user->admin || $user->rights->user->group->readperms); $h = 0; @@ -126,7 +126,7 @@ function group_prepare_head($object) $head[$h][2] = 'ldap'; $h++; } - + if ($canreadperms) { $head[$h][0] = DOL_URL_ROOT.'/user/group/perms.php?id='.$object->id; @@ -134,7 +134,7 @@ function group_prepare_head($object) $head[$h][2] = 'rights'; $h++; } - + // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__'); diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index f177e91ff71..66c5433c441 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -43,7 +43,7 @@ $canreaduser=($user->admin || ($user->rights->user->user->lire && $user->rights- $caneditperms=($user->admin || $user->rights->user->user->creer); // Defini si peux modifier ses propres permissions -$caneditselfperms=($user->admin || ($user->id == $_GET["id"] && $user->rights->user->self->writeperms)); +//$caneditselfperms=($user->admin || ($user->id == $_GET["id"])); // Security check $socid=0;