Univention Bugzilla – Attachment 8323 Details for
Bug 43247
Regression: sync_to_ucs of new joined windows client fails with traceback
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
hotfix
43247.patch (text/plain), 2.03 KB, created by
Florian Best
on 2016-12-23 09:38:35 CET
(
hide
)
Description:
hotfix
Filename:
MIME Type:
Creator:
Florian Best
Created:
2016-12-23 09:38:35 CET
Size:
2.03 KB
patch
obsolete
>diff --git a/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py b/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >index b88af05..866be35 100644 >--- a/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >+++ b/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >@@ -2430,14 +2430,16 @@ def update_groups(self): > return > univention.debug.debug(univention.debug.ADMIN, univention.debug.INFO, 'updating groups') > >+ def _append_dn(from_, target, dn): >+ if not any(self.lo.lo.compare_dn(x, dn) for x in from_): >+ target.append(dn) >+ > add_to_group = [] > remove_from_group = [] > for group in self.oldinfo.get('groups', []): >- if group not in self.info.get('groups', []): >- remove_from_group.append(group) >+ _append_dn(self.info.get('groups', []), remove_from_group, group) > for group in self.info.get('groups', []): >- if group not in self.oldinfo.get('groups', []): >- add_to_group.append(group) >+ _append_dn(self.oldinfo.get('groups', []), add_to_group, group) > > if 'oldPrimaryGroupDn' in self.__dict__: > if self.oldPrimaryGroupDn: >@@ -2455,14 +2457,14 @@ def update_groups(self): > for group in add_to_group: > groupObject = univention.admin.objects.get(univention.admin.modules.get('groups/group'), self.co, self.lo, self.position, group) > groupObject.open() >- if self.dn not in groupObject['hosts']: >+ if not any(self.lo.lo.compare_dn(x, self.dn) for x in groupObject['hosts']): > groupObject['hosts'].append(self.dn) > groupObject.modify(ignore_license=1) > > for group in remove_from_group: > groupObject = univention.admin.objects.get(univention.admin.modules.get('groups/group'), self.co, self.lo, self.position, group) > groupObject.open() >- if self.dn in groupObject['hosts']: >+ if not any(self.lo.lo.compare_dn(x, self.dn) for x in groupObject['hosts']): > groupObject['hosts'].remove(self.dn) > groupObject.modify(ignore_license=1) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 43247
:
8322
| 8323