Code position

This commit is contained in:
Laurent Destailleur 2021-03-19 15:09:06 +01:00
parent 7056cf7614
commit 3414511d7f

View File

@ -33,16 +33,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php';
// Load translation files required by page
$langs->loadLangs(array('companies', 'ldap', 'users', 'admin'));
// Users/Groups management only in master entity if transverse mode
if (!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE) {
accessforbidden();
}
$canreadperms = true;
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
$canreadperms = ($user->admin || $user->rights->user->group_advance->read);
}
$id = GETPOST('id', 'int');
$action = GETPOST('action', 'aZ09');
@ -55,6 +45,16 @@ $object = new Usergroup($db);
$object->fetch($id);
$object->getrights();
// Users/Groups management only in master entity if transverse mode
if (!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE) {
accessforbidden();
}
$canreadperms = true;
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
$canreadperms = ($user->admin || $user->rights->user->group_advance->read);
}
/*
* Actions