|
@@ -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
|