55use UnityWebPortal \lib \exceptions \EntryNotFoundException ;
66use PHPOpenLDAPer \LDAPConn ;
77use PHPOpenLDAPer \LDAPEntry ;
8+ use UnityWebPortal \lib \PosixGroup ;
89
910/**
1011 * An LDAP connection class which extends LDAPConn tailored for the Unity Cluster
@@ -35,8 +36,12 @@ class UnityLDAP extends LDAPConn
3536 private LDAPEntry $ groupOU ;
3637 private LDAPEntry $ pi_groupOU ;
3738 private LDAPEntry $ org_groupOU ;
38- private LDAPEntry $ adminGroup ;
39- private LDAPEntry $ qualifiedUserGroup ;
39+
40+ public PosixGroup $ adminGroup ;
41+ public PosixGroup $ qualifiedUserGroup ;
42+ public PosixGroup $ lockedUserGroup ;
43+ public PosixGroup $ idlelockedUserGroup ;
44+ public PosixGroup $ ghostUserGroup ;
4045
4146 public function __construct ()
4247 {
@@ -46,8 +51,19 @@ public function __construct()
4651 $ this ->groupOU = $ this ->getEntry (CONFIG ["ldap " ]["group_ou " ]);
4752 $ this ->pi_groupOU = $ this ->getEntry (CONFIG ["ldap " ]["pigroup_ou " ]);
4853 $ this ->org_groupOU = $ this ->getEntry (CONFIG ["ldap " ]["orggroup_ou " ]);
49- $ this ->adminGroup = $ this ->getEntry (CONFIG ["ldap " ]["admin_group " ]);
50- $ this ->qualifiedUserGroup = $ this ->getEntry (CONFIG ["ldap " ]["qualified_user_group " ]);
54+ $ this ->adminGroup = new PosixGroup (new LDAPEntry ($ this , CONFIG ["ldap " ]["admin_group " ]));
55+ $ this ->qualifiedUserGroup = new PosixGroup (
56+ new LDAPEntry ($ this , CONFIG ["ldap " ]["qualified_user_group " ]),
57+ );
58+ $ this ->lockedUserGroup = new PosixGroup (
59+ new LDAPEntry ($ this , CONFIG ["ldap " ]["locked_user_group " ]),
60+ );
61+ $ this ->idlelockedUserGroup = new PosixGroup (
62+ new LDAPEntry ($ this , CONFIG ["ldap " ]["idlelocked_user_group " ]),
63+ );
64+ $ this ->ghostUserGroup = new PosixGroup (
65+ new LDAPEntry ($ this , CONFIG ["ldap " ]["ghost_user_group " ]),
66+ );
5167 }
5268
5369 public function getUserOU (): LDAPEntry
@@ -70,16 +86,6 @@ public function getOrgGroupOU(): LDAPEntry
7086 return $ this ->org_groupOU ;
7187 }
7288
73- public function getAdminGroup (): LDAPEntry
74- {
75- return $ this ->adminGroup ;
76- }
77-
78- public function getQualifiedUserGroup (): LDAPEntry
79- {
80- return $ this ->qualifiedUserGroup ;
81- }
82-
8389 public function getDefUserShell (): string
8490 {
8591 return $ this ->def_user_shell ;
0 commit comments