Univention Bugzilla – Bug 49320
Apple School Connector fails silent if anonymize attribut is set which a user does not have
Last modified: 2022-07-13 16:13:06 CEST
Connector fails "silent" with traceback: 1723 actions.configure 19-04-18 11:13:28 [ WARNING]: Creating ZIP file in /var/lib/asm/asm_2019-04-18T11:13:28.983662.zip... 1723 actions.configure 19-04-18 11:13:28 [ WARNING]: Creating CSV files... 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: Writing 2 objects to students.csv... 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: Writing 3 objects to locations.csv... 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: Traceback (most recent call last): 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: File "/usr/sbin/asm-upload", line 98, in <module> 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: main() 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: File "/usr/sbin/asm-upload", line 89, in main 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: zip_path = asmUpload.upload() 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: File "/usr/lib/pymodules/python2.7/univention/asm/asm_upload.py", line 60, in upload 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: zip_path = AsmZipFile(file_path, self.ou_whitelist).write_zip() 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: File "/usr/lib/pymodules/python2.7/univention/asm/csv/zip_file.py", line 99, in write_zip 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: self.csv_files = self.create_csv_files() 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: File "/usr/lib/pymodules/python2.7/univention/asm/csv/zip_file.py", line 76, in create_csv_files 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: self.csv_files = create_csv_files(tmp_dir, self.ou_whitelist) 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: File "/usr/lib/pymodules/python2.7/univention/asm/csv/csv_file.py", line 369, in create_csv_files 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: cls(path, ou_whitelist).write_csv() 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: File "/usr/lib/pymodules/python2.7/univention/asm/csv/csv_file.py", line 182, in write_csv 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: for obj in objs: 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: File "/usr/lib/pymodules/python2.7/univention/asm/csv/csv_file.py", line 301, in find_and_create_objects 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: yield AsmStaff.from_dn(dn, ou_whitelist=self.ou_whitelist) 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: File "/usr/lib/pymodules/python2.7/univention/asm/models/staff.py", line 174, in from_dn 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: additional_location_ids=location_ids[1:] 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: File "/usr/lib/pymodules/python2.7/univention/asm/models/base.py", line 149, in anonymize 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: raise ValueError('Attribute {!r} not found in LDAP object of {}.'.format(attr, user)) 1723 actions.configure 19-04-18 11:13:29 [ WARNING]: ValueError: Attribute 'mailPrimaryAddress' not found in LDAP object of Teacher(name='demo_teacher', school='DEMOSCHOOL', dn='uid=demo_teacher,cn=lehrer,cn=users,ou=DEMOSCHOOL,dc=schulen-univention,dc=intranet'). Konfiguration: asm/attributes/staff/anonymize: yes asm/attributes/staff/anonymize/email_address: %mailPrimaryAddress asm/attributes/student/anonymize: yes asm/attributes/student/anonymize/email_address: %mailPrimaryAddress