Univention Bugzilla – Attachment 9722 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]
AttributeHook base class that also works
hook.py (text/plain), 986 bytes, created by
Dirk Wiesenthal
on 2018-10-30 16:21:37 CET
(
hide
)
Description:
AttributeHook base class that also works
Filename:
MIME Type:
Creator:
Dirk Wiesenthal
Created:
2018-10-30 16:21:37 CET
Size:
986 bytes
patch
obsolete
>from univention.admin.hook import simpleHook > >class AttributeHook(simpleHook): > attribute_name = [] > > def hook_open(self, obj): > value = obj.get(self.attribute_name) > obj[self.attribute_name] = self.map_attribute_value_to_udm(value) > > def hook_ldap_modlist(self, obj, ml): > new_ml = [] > for key, old_value, new_value in ml: > if key == self.attribute_name: > new_value = self.map_attribute_value_to_ldap(new_value) > new_ml.append((key, old_value, new_value)) > return new_ml > > def map_attribute_value_to_ldap(self, value): > # return value as it shall be saved in ldap > return value > > def map_attribute_value_to_udm(self, value): > # return value as it shall be used in udm objects > # needs to be syntax compliant > return value
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