Univention Bugzilla – Attachment 9244 Details for
Bug 43129
Enhance UDM Syntax for Generalized Time Syntax
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
43129.patch (text/plain), 2.05 KB, created by
Florian Best
on 2017-10-10 12:17:51 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2017-10-10 12:17:51 CEST
Size:
2.05 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 75e3839..fae6824 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 >@@ -930,12 +930,40 @@ def description(self): > def _post_unmap(self, info, values): > """This method can be overwritten to define special un-map > methods that can not be done with the default mapping API""" >+ univention.debug.debug(univention.debug.ADMIN, univention.debug.INFO, 'modules/__init__.py _post_unmap called with info=[%r] values=[%r]' % (info, values)) >+ # Allow the fromLDAP() method of the syntax class to convert >+ # a raw LDAP value into UDM-specific representation >+ for field in info: >+ property_ = self.description.get(field) >+ if not property_ or not hasattr(property_.syntax, 'fromLDAP'): >+ continue >+ value = info[field] >+ if isinstance(value, (list, tuple)): >+ value = [property_.syntax.fromLDAP(x) for x in value] >+ else: >+ value = property_.syntax.fromLDAP(value) >+ info[field] = value >+ > return info > > def _post_map(self, modlist, diff): > """This method can be overwritten to define special map methods > that can not be done with the default mapping API""" >- return modlist >+ univention.debug.debug(univention.debug.ADMIN, univention.debug.INFO, 'modules/__init__.py _post_map called with modlist=[%r] diff=[%r]' % (modlist, diff)) >+ ml = [] >+ for tuple_ in modlist: >+ try: >+ key, old, new = tuple_ >+ except ValueError: >+ old = None >+ key, new = tuple_ >+ property_ = self.descriptions.get(key) >+ if not property_ or not hasattr(property_.syntax, 'toLDAP'): >+ ml.append(tuple_) >+ continue >+ new = property_.syntax.toLDAP(new) >+ ml.append((key, old, new)) >+ return ml > > def _ldap_modlist(self): > """Builds the list of modifications when creating and modifying this object.
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 43129
:
9243
| 9244 |
9245
|
9246
|
9722
|
9766