Univention Bugzilla – Attachment 10168 Details for
Bug 50080
Handle name conflicts between extended attributes and existing UDM property
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Some starting point
50080.patch (text/plain), 2.37 KB, created by
Florian Best
on 2019-08-29 11:03:04 CEST
(
hide
)
Description:
Some starting point
Filename:
MIME Type:
Creator:
Florian Best
Created:
2019-08-29 11:03:04 CEST
Size:
2.37 KB
patch
obsolete
>commit e0967d88df00f5bcceb8cc570eb715546ce95346 >Author: Florian Best <best@univention.de> >Date: Tue Aug 6 18:43:42 2019 +0200 > > Bug #49092: prevent extended attribute to overwrite mapping of existing properties > > For example, there exists a extended attribute with ldapMapping=initials and CLIName=myInitials it would overwrite the mapping. > Therefore UDM doesn't have a value for that property, e.g: > udm users/user list --filter uid=foo | grep -i initial > initials: None > myInitials: A.B. > > After the fix: > udm users/user list --filter uid=foo | grep -i initial > initials: A.B. > myInitials: None > > Not sure if this is the best fix. It's currently not easily possible to map > both. > >diff --git a/management/univention-directory-manager-modules/modules/univention/admin/modules.py b/management/univention-directory-manager-modules/modules/univention/admin/modules.py >index 7b73ad9622..006f691ddc 100644 >--- a/management/univention-directory-manager-modules/modules/univention/admin/modules.py >+++ b/management/univention-directory-manager-modules/modules/univention/admin/modules.py >@@ -465,10 +465,18 @@ def update_extended_attributes(lo, module, position): > ) > > # add LDAP mapping >- if attrs['univentionUDMPropertyLdapMapping'][0].lower() != 'objectClass'.lower(): >- module.mapping.register(pname, attrs['univentionUDMPropertyLdapMapping'][0], unmap_method, map_method) >+ attribute_name = attrs['univentionUDMPropertyLdapMapping'][0] >+ if attribute_name.lower() != 'objectClass'.lower(): >+ already_existing_map_name = module.mapping.mapName(pname) >+ already_existing_unmap_name = module.mapping.unmapName(attribute_name) >+ if already_existing_map_name and already_existing_map_name != attribute_name: >+ pass >+ elif already_existing_unmap_name and already_existing_unmap_name != pname: >+ pass >+ else: >+ module.mapping.register(pname, attribute_name, unmap_method, map_method) > else: >- module.mapping.register(pname, attrs['univentionUDMPropertyLdapMapping'][0], univention.admin.mapping.nothing, univention.admin.mapping.nothing) >+ module.mapping.register(pname, attribute_name, univention.admin.mapping.nothing, univention.admin.mapping.nothing) > > if hasattr(module, 'layout'): > tabname = attrs.get('univentionUDMPropertyTranslationTabName;entry-%s' % lang, attrs.get('univentionUDMPropertyLayoutTabName', [_('Custom')]))[0]
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 50080
: 10168