Skip to content

Commit 869291e

Browse files
committed
remove useless group ou
1 parent 8a428ca commit 869291e

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

defaults/config.ini.default

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pass = "password" ; Admin bind password
2020
basedn = "dc=unityhpc,dc=test" ; Base search DN
2121
user_ou = "ou=users,dc=unityhpc,dc=test" ; User organizational unit (may contain more than user group)
2222
user_group = "cn=unityusers,dc=unityhpc,dc=test" ; User group
23-
group_ou = "ou=groups,dc=unityhpc,dc=test" ; Group organizational unit
23+
; group_ou = "ou=groups,dc=unityhpc,dc=test" ; Group organizational unit
2424
pigroup_ou = "ou=pi_groups,dc=unityhpc,dc=test" ; PI Group organizational unit
2525
orggroup_ou = "ou=org_groups,dc=unityhpc,dc=test" ; ORG group organizational unit
2626
admin_group = "cn=web_admins,dc=unityhpc,dc=test" ; admin dn (members of this group are admins on the web portal)

resources/init.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
$CONFIG["ldap"]["pass"],
4242
__DIR__ . "/../deployment/custom_user_mappings",
4343
$CONFIG["ldap"]["user_ou"],
44-
$CONFIG["ldap"]["group_ou"],
44+
// $CONFIG["ldap"]["group_ou"],
4545
$CONFIG["ldap"]["pigroup_ou"],
4646
$CONFIG["ldap"]["orggroup_ou"],
4747
$CONFIG["ldap"]["admin_group"],

resources/lib/UnityLDAP.php

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ class UnityLDAP extends ldapConn
2727

2828
// string vars for OUs
2929
private $STR_USEROU;
30-
private $STR_GROUPOU;
30+
// private $STR_GROUPOU;
3131
private $STR_PIGROUPOU;
3232
private $STR_ORGGROUPOU;
3333
private $STR_ADMINGROUP;
3434

3535
// Instance vars for various ldapEntry objects
3636
private $userOU;
37-
private $groupOU;
37+
// private $groupOU;
3838
private $pi_groupOU;
3939
private $org_groupOU;
4040
private $adminGroup;
@@ -49,7 +49,7 @@ public function __construct(
4949
$pass,
5050
$custom_user_mappings,
5151
$user_ou,
52-
$group_ou,
52+
// $group_ou,
5353
$pigroup_ou,
5454
$orggroup_ou,
5555
$admin_group,
@@ -59,14 +59,14 @@ public function __construct(
5959
parent::__construct($host, $dn, $pass);
6060

6161
$this->STR_USEROU = $user_ou;
62-
$this->STR_GROUPOU = $group_ou;
62+
// $this->STR_GROUPOU = $group_ou;
6363
$this->STR_PIGROUPOU = $pigroup_ou;
6464
$this->STR_ORGGROUPOU = $orggroup_ou;
6565
$this->STR_ADMINGROUP = $admin_group;
6666

6767
// Get Global Entries
6868
$this->userOU = $this->getEntry($user_ou);
69-
$this->groupOU = $this->getEntry($group_ou);
69+
// $this->groupOU = $this->getEntry($group_ou);
7070
$this->pi_groupOU = $this->getEntry($pigroup_ou);
7171
$this->org_groupOU = $this->getEntry($orggroup_ou);
7272
$this->adminGroup = $this->getEntry($admin_group);
@@ -85,10 +85,10 @@ public function getUserOU()
8585
return $this->userOU;
8686
}
8787

88-
public function getGroupOU()
89-
{
90-
return $this->groupOU;
91-
}
88+
// public function getGroupOU()
89+
// {
90+
// return $this->groupOU;
91+
// }
9292

9393
public function getPIGroupOU()
9494
{
@@ -186,13 +186,12 @@ private function PIGIDNumInUse($id)
186186

187187
private function GIDNumInUse($id)
188188
{
189-
$groups = $this->groupOU->getChildrenArray(true);
190-
foreach ($groups as $group) {
191-
if ($group["gidnumber"][0] == $id) {
192-
return true;
193-
}
194-
}
195-
189+
// $groups = $this->groupOU->getChildrenArray(true);
190+
// foreach ($groups as $group) {
191+
// if ($group["gidnumber"][0] == $id) {
192+
// return true;
193+
// }
194+
// }
196195
return false;
197196
}
198197

0 commit comments

Comments
 (0)