Bug 20781 - [PATCH] upper/lowercase für Benutzertemplates
[PATCH] upper/lowercase für Benutzertemplates
Status: CLOSED DUPLICATE of bug 21897
Product: UCS manual
Classification: Unclassified
Component: ZZZ - Trash - UDM
unspecified
Other Linux
: P5 normal (vote)
: UCS 2.4-2
Assigned To: Moritz Muehlenhoff
Sönke Schwardt-Krummrich
:
Depends on: 20302
Blocks: 20767 20782
  Show dependency treegraph
 
Reported: 2010-11-24 10:03 CET by Alexander Kläser
Modified: 2017-05-09 08:38 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2010-11-24 10:03:22 CET
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.)
Comment 1 Moritz Muehlenhoff univentionstaff 2011-03-22 11:31:59 CET

*** This bug has been marked as a duplicate of bug 21897 ***
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2011-03-25 15:40:23 CET
Ja, duplikat.
Comment 3 Stefan Gohmann univentionstaff 2017-05-09 08:38:00 CEST
Close old verified docu issues.