Univention Bugzilla – Bug 18499
LDAP_Search Syntax via UCR verwenden
Last modified: 2010-08-31 13:22:07 CEST
Es ist derzeit nicht möglich eine LDAP_Search Syntax zu verwenden, wenn das Attribut per UCR gesetzt wird. Bspw.: root@qamaster:~# ldapsearch -x cn=thinClientAutostart -LLL | ldapsearch-wrapper dn: cn=thinClientAutostart,cn=Thin Client,cn=custom attributes,cn=univention,dc=univention,dc=qa univentionSyntaxLDAPFilter: objectClass=univentionThinClientAutostart objectClass: top objectClass: univentionSyntax univentionSyntaxLDAPAttribute: univentionThinClientAutostartName univentionSyntaxViewOnly: FALSE univentionSyntaxLDAPValue: univentionThinClientAutostartCommand cn: thinClientAutostart ucr set directory/manager/web/modules/policies/autostart/properties/autostartScript/syntax=thinClientAutostart
fixed
Es gibt noch ein Problem wenn die die Richtlinie direkt am Objekt bearbeitet wird: Traceback (most recent call last): File "/usr/share/univention-webui/modules/requests.py", line 262, in run_request self.dialog.init(got_input, self.xmlin, self.xmlin.documentElement) File "./unidialog.py", line 63, in init uniconf.init(self,a,b,c) File "/usr/share/univention-webui/modules/uniconf.py", line 183, in init obj.init(input,xmlob,self.find_id(node,obj.id)) File "/usr/share/univention-webui/modules/uniconf.py", line 162, in init self.myinit() File "/usr/share/univention-directory-manager/uniconf/modedit.py", line 4750, in myinit filter = property._replace( property.syntax.filter, self.object ) AttributeError: LDAP_Search instance has no attribute 'filter'
Ist mittlerweile angepasst.
Die UCR Vorgabe für die Syntax von UDM Attributen klappt i.M. nicht. Z.B wird für die private Adresse trotz -> ucr get directory/manager/web/modules/users/user/properties/homePostalAddress/syntax postalAddress nicht die komplexe Syntax verwendet. Im log file sieht man: 08.07.10 17:06:35 ADMIN ( ERROR ) : ucr_overwrite_properties: failed to set property attribute: string instance has no __call__ method Wenn ich den try expect Block aus admin/__init__.py entferne, gibt es folgenden Traceback: Traceback (most recent call last): File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 233, in doit output = univention.admincli.admin.doit(arglist) File "/usr/lib/python2.4/site-packages/univention/admincli/admin.py", line 553, in doit univention.admin.modules.init(lo,position,module) File "/usr/lib/python2.4/site-packages/univention/admin/modules.py", line 90, in init univention.admin.ucr_overwrite_properties( module, lo ) File "/usr/lib/python2.4/site-packages/univention/admin/__init__.py", line 76, in ucr_overwrite_properties setattr( module.property_descriptions[ prop ], attr, syntax() ) AttributeError: string instance has no __call__ method Ich vermute es hat etwas hiermit zu tun. if attr in ( 'syntax', ): ... if hasattr(univention.admin.syntax, baseConfig[ var ]) and False: syntax = getattr( univention.admin.syntax, baseConfig[ var ] ) setattr( module.property_descriptions[ prop ], attr, syntax() ) else: if lo.search( filter = uni Per UCR habe ich ja eine syntax definiert. Aber in den if zweig kommt er wegen "and False" wohl nie.
(In reply to comment #4) > Die UCR Vorgabe für die Syntax von UDM Attributen klappt i.M. nicht. Z.B wird > für die private Adresse trotz > > -> ucr get > directory/manager/web/modules/users/user/properties/homePostalAddress/syntax > postalAddress > > nicht die komplexe Syntax verwendet. > > Im log file sieht man: > 08.07.10 17:06:35 ADMIN ( ERROR ) : ucr_overwrite_properties: failed > to set property attribute: string instance has no __call__ method > > Wenn ich den try expect Block aus admin/__init__.py entferne, gibt es folgenden > Traceback: > > Traceback (most recent call last): > File "/usr/share/univention-directory-manager-tools/univention-cli-server", > line 233, in doit > output = univention.admincli.admin.doit(arglist) > File "/usr/lib/python2.4/site-packages/univention/admincli/admin.py", line > 553, in doit > univention.admin.modules.init(lo,position,module) > File "/usr/lib/python2.4/site-packages/univention/admin/modules.py", line 90, > in init > univention.admin.ucr_overwrite_properties( module, lo ) > File "/usr/lib/python2.4/site-packages/univention/admin/__init__.py", line > 76, in ucr_overwrite_properties > setattr( module.property_descriptions[ prop ], attr, syntax() ) > AttributeError: string instance has no __call__ method > > Ich vermute es hat etwas hiermit zu tun. > > if attr in ( 'syntax', ): > ... > if hasattr(univention.admin.syntax, baseConfig[ var ]) and False: > syntax = getattr( univention.admin.syntax, baseConfig[ var ] ) > setattr( module.property_descriptions[ prop ], attr, syntax() ) > else: > if lo.search( filter = uni > > Per UCR habe ich ja eine syntax definiert. Aber in den if zweig kommt er wegen > "and False" wohl nie. Ist angepasst.
*** Bug 19427 has been marked as a duplicate of this bug. ***
Funktioniert. Das Überschreiben der Syntax für eine Property mit einer im LDAP definierten LDAPSearch-Syntax funktioniert sowohl bei "normalen" Properties als auch bei solchen, die über eine Policy an das Objekt vererbt werden. Changelogeintrag ist vorhanden.
UCS 2.4 wurde veröffentlicht. Sollte der hier beschriebene Bug mit einer neueren Version von UCS erneut auftreten, so sollte der Bug dupliziert werden: "Clone This Bug".