Commit 59ad24be authored by Patrick Mischke's avatar Patrick Mischke
parents 5e6e60b7 e551fee0
......@@ -92,8 +92,8 @@ class FsrLdap:
"""
logging.info("Fetching Protokollant from LDAP ...")
try:
fil = "(uid="+current_user()+")"
if self.conn.search('ou=people,' + self.base, fil,
fil = "(objectClass=posixAccount)"
if self.conn.search('uid=' + current_user() + ',ou=people,' + self.base, fil, # noqa: E501
attributes=['displayName']):
logging.info("Done")
return " ".join(str(self.conn.entries[0]['displayName']).split(", ")[::-1]) # noqa: E501
......@@ -157,10 +157,9 @@ class FsrLdap:
fil = '(cn=intern)'
fsr = []
if self.conn.search('ou=group,'+self.base, fil,
attributes=['memberUid']):
for i in self.conn.entries[0]['memberUid']:
if self.conn.search('ou=people,' + self.base,
'(uid='+i+')',
attributes=['member']):
for i in self.conn.entries[0]['member']:
if self.conn.search(i, '(objectClass=posixAccount)',
attributes=['displayName']):
fsr += [str(self.conn.entries[0]['displayName'])]
fsr.sort()
......@@ -232,10 +231,9 @@ class FsrLdap:
fil = '(cn=extern)'
fsr_extern = []
if self.conn.search('ou=group,'+self.base, fil,
attributes=['memberUid']):
for i in self.conn.entries[0]['memberUid']:
if self.conn.search('ou=people,' + self.base,
'(uid='+i+')',
attributes=['member']):
for i in self.conn.entries[0]['member']:
if self.conn.search(i, '(objectClass=posixAccount)',
attributes=['displayName']):
fsr_extern += [str(self.conn.entries[0]['displayName'])] # noqa: E501
fsr_extern.sort()
......
......@@ -240,7 +240,8 @@ if __name__ == "__main__":
if not OPT.Vollversamlung:
body += gen_attendance_tab(FSR[0], NUM_COLS)
body += gen_attendance_tab(FSR[1], NUM_COLS_EXT, ext=True, default = '-')
body += gen_attendance_tab(FSR[1], NUM_COLS_EXT,
ext=True, default='-')
footer = gen_footer(SHARE_DIR, OPT.Vollversamlung, REG,
SPRECHER, PROTOKOLLANT, DATE)
......
......@@ -11,12 +11,10 @@ Katharina Hilgert
Sarah Kovač
Rutger Kuwertz
Felix Lang
Annika Lesch
Patrick Mischke
Jacqueline Momperé
Kevin Mours
Tarek Moussa
Lukas Neusius
Diana Remmel
Lorenz Steinert
Aaron Thielmann
......
Stefano Galimberti
Tatjana Grün
Gina Gräßle
Tamara Hamann
Sabrina Hammel
Maximilian Kiefer
Nikolas Longen
Christopher Mink
Linda Müller
Stephanie Roden
Matthias Rüb
Felix Selz
Sven Stawinski
Marco Tummeley
......@@ -77,7 +77,7 @@
\\newcommand{\\julian}{Julian Schulz\\xspace}
\\newcommand{\\juls}{Julian Schulz\\xspace}
\\newcommand{\\lorenz}{Lorenz Steinert\\xspace}
\\newcommand{\\marco}{Marco Tummeley\\xspace}
\\newcommand{\\marco}{Marco Decker\\xspace}
\\newcommand{\\uei}{Markus Ühlein\\xspace}
\\newcommand{\\markus}{Markus Ühlein\\xspace}
\\newcommand{\\sternchen}{Katharina Hilgert\\xspace}
......@@ -98,6 +98,8 @@
\\newcommand{\\jacy}{Jacqueline Momperé\\xspace}
\\newcommand{\\jaky}{Jacqueline Momperé\\xspace}
\\newcommand{\\jacky}{Jacqueline Momperé\\xspace}
\\newcommand{\\sven}{Sven Stawinski\\xspace}
\\newcommand{\\felixzwei}{Felix Selz\\xspace}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment