Qual: Removed useless permissions
This commit is contained in:
parent
1a1749127e
commit
c45c7e93bf
@ -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';
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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__');
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user