Univention Bugzilla – Bug 20781
[PATCH] upper/lowercase für Benutzertemplates
Last modified: 2017-05-09 08:38:00 CEST
Diese Erweiterung mit ":lower" und ":upper" sollte noch im Handbuch dokumentiert werden. +++ This bug was initially created as a clone of Bug #20302 +++ Aus dem Forum: http://forum.univention.de/viewtopic.php?f=23&t=1125&p=3732 --- /usr/share/pyshared/univention/admin/__init__.py.orig 2010-10-04 11:47:38.000000000 +0200 +++ /usr/share/pyshared/univention/admin/__init__.py 2010-10-04 11:54:23.000000000 +0200 @@ -125,6 +125,19 @@ class property: except SyntaxError: return object[key] return object[key] + elif object.has_key(key[:-2]) and object[key[:-2]] and \ + (key[-2:-1] == ':') and (key[-1:] in ('L', 'U')): + val = object[key[:-2]] + if key[-1:] == 'L': + val = val.lower() + if key[-1:] == 'U': + val = val.upper() + if ext: + try: + return eval('val%s' % ext) + except SyntaxError: + return val + return val elif key == 'dn' and object.dn: return object.dn return '' Dieser Patch erlaubt Sachen wie: <firstname:L>[0:1].<lastname:L>@domain.de Wäre schön, wenn das im nächsten UCS auftauchte! (Wir benutzen das jetzt mal, um uns enorm Zeit=Geld zu sparen… die eMail-Adressen müssen ja ausschließlich aus Kleinbuchstaben bestehen, da Kolab sonst noch mehr kaputt ist.)
*** This bug has been marked as a duplicate of bug 21897 ***
Ja, duplikat.
Close old verified docu issues.