Source

iredadmin-ose / libs / ldaplib / user.py

Diff from to

File libs/ldaplib/user.py

                 # Update domainGlobalAdmin=yes
                 if 'domainGlobalAdmin' in data:
                     mod_attrs = [(ldap.MOD_REPLACE, 'domainGlobalAdmin', 'yes')]
+                    # Update enabledService=domainadmin
+                    connutils.addOrDelAttrValue(
+                        dn=self.dn,
+                        attr='enabledService',
+                        value='domainadmin',
+                        action='add',
+                    )
                 else:
                     mod_attrs = [(ldap.MOD_REPLACE, 'domainGlobalAdmin', None)]
+                    # Remove enabledService=domainadmin
+                    connutils.addOrDelAttrValue(
+                        dn=self.dn,
+                        attr='enabledService',
+                        value='domainadmin',
+                        action='delete',
+                    )
 
             # Get display name.
             cn = data.get('cn', None)