Commit Graph

4182 Commits

Author SHA1 Message Date
Benjamin Dauvergne fe345e5746 tests: improve ldap tests with non ASCII characters in uid (#31273) 2019-03-11 20:49:34 +01:00
Benjamin Dauvergne b475f6b7df ldap: encode string before using urlparse.quote() on them (#31273)
quote() only handle byte strings or ASCII only unicode strings with Python3,
to be compatible with both python versions the best is to encode string before
quoting them.
2019-03-11 20:49:28 +01:00
Benjamin Dauvergne 0f0c0790d0 ldap: only wrap LDAPObject.result4 (#31273)
result4() is the only function in python-ldap really handling results from LDAP requests,
all other methods calls it; if we encode attributes from other function we
duplicate work.
2019-03-11 20:47:17 +01:00
Benjamin Dauvergne 2bb6f8aab3 ldap: do not return referrals in _convert_results_to_unicode (#31273)
Wrong indentation kept referrals.
2019-03-11 20:45:43 +01:00
Benjamin Dauvergne ebab175401 ldap: do not hardcode bytes_mode argument (#31273) 2019-03-11 20:44:14 +01:00
Benjamin Dauvergne 9ec79b6d24 ldap: ignore undecodable attribute values (fixes #31232)
Tests augmented with a jpegPhot binary attribute.
2019-03-08 22:22:08 +01:00
Benjamin Dauvergne 8a68af0e48 ldap: do not retrieve any attribute when looking for user DNs (#31232) 2019-03-08 22:12:10 +01:00
Paul Marillonnet 3f02579dc3 solve migration conflit (#31214) 2019-03-08 11:23:25 +01:00
Paul Marillonnet 595d05ad7a add missing translation strings (#31213) 2019-03-08 11:10:08 +01:00
Paul Marillonnet 934d619f6b python3: use django.utils.six url-parsing functions (#31139) 2019-03-08 10:35:55 +01:00
Emmanuel Cazenave 9768e8fe3e OU attribute to hide username on user add (#25669) 2019-03-08 10:25:19 +01:00
Paul Marillonnet 6bb479d44e python3: remove call parameters for 'int' initializer (#31144) 2019-03-07 17:28:49 +01:00
Paul Marillonnet 20bcf5ac0c python3: fix implicit relative submodule imports (#31143) 2019-03-07 14:11:55 +01:00
Paul Marillonnet f6fa7f7c56 python3: adapt exception raising and handling (#31137) 2019-03-07 13:58:28 +01:00
Paul Marillonnet 54d01cf903 python3: use __future__.print_function (#31140) 2019-03-07 13:55:29 +01:00
Paul Marillonnet 4a5311543f idp cas: adapt migration to changes in the service model (#30959) 2019-03-07 12:02:14 +01:00
Paul Marillonnet 97c12bdbc9 manager: add settings for password section options on user add (#25666) 2019-03-06 15:58:12 +01:00
Emmanuel Cazenave 2741961ead access context through table object (#31092) 2019-03-05 13:34:32 +01:00
Frédéric Péters c63b9f0a26 tests: adapt oidc authorization code sso to new default timeout value (#30939) 2019-03-02 07:39:19 +01:00
Benjamin Dauvergne a486586bed idp_oidc: set default frontchannel_timeout to 300ms (fixes #30939) 2019-03-01 19:48:30 +01:00
Benjamin Dauvergne fae901f5a2 support ou selector in backends and forms (fixes #30252) 2019-03-01 17:30:36 +01:00
Benjamin Dauvergne fdc2959104 forms: add ou selector to login form (#30252) 2019-03-01 17:30:00 +01:00
Benjamin Dauvergne f44735179f utils: add a lazy_label helper (#30252)
It allows giving a default value for a label with a getter function to
allow customization.
2019-03-01 17:30:00 +01:00
Benjamin Dauvergne 4599df562a tests: add copyright header (#30252) 2019-03-01 17:30:00 +01:00
Benjamin Dauvergne 34f42d271a backends: PEP8ness, style (#30252) 2019-03-01 17:30:00 +01:00
Benjamin Dauvergne f29496c5f1 forms: PEP8ness, style (#30252) 2019-03-01 17:30:00 +01:00
Benjamin Dauvergne bc6892289e ldap: subclass LDAPObject to provide uniform unicode support (fixes #30577) 2019-03-01 16:10:05 +01:00
Benjamin Dauvergne 93a0935e49 ldap: use current password if we already know it (#30577)
No need to look it in the session.
2019-03-01 16:09:18 +01:00
Benjamin Dauvergne 75025ab544 ldap: use PASSWD command if old password is known (#30577)
If we do not know the old password it's better to try a MOD_REPLACE.
2019-03-01 16:09:18 +01:00
Benjamin Dauvergne e3e03d17e5 tests: non regression tests (#30577) 2019-03-01 16:09:18 +01:00
Benjamin Dauvergne de82c30847 tox.ini: add testing with python-ldap<3 (#30577)
Because there was big API change after version 3 and Debian stable is
still stuck with version 2.4.28.
2019-03-01 16:06:20 +01:00
Benjamin Dauvergne 1b9f11a3a7 tox.ini: set default environment to python2.7 (#30577)
In order to run in a python3 tox.
2019-03-01 16:06:20 +01:00
Serghei Mihai 506df5b5ce auth_saml: remove useless credentials param and add optional request (#30543)
And so assure compliance with Django 1.11
2019-02-14 09:34:04 +01:00
Benjamin Dauvergne d28a6bba25 ldap: allow provisionning of all user attributes (fixes #30535) 2019-02-12 11:49:04 +01:00
Benjamin Dauvergne 9d96274c7b tests: PEP8ness and style on test_ldap (#30535) 2019-02-12 11:48:59 +01:00
Paul Marillonnet 0861171b5b update django_rbac translations (#26156) 2019-02-06 10:22:14 +01:00
Paul Marillonnet b8209cf924 update authentic2_auth_oidc french translations (#26156) 2019-02-06 10:22:09 +01:00
Frédéric Péters 2ac3f0f99a translation update (#26156) 2019-02-05 18:20:42 +01:00
Benjamin Dauvergne 8ee1c232dc tox.ini: limit to pytest-django<3.4.6
See #30307 and https://github.com/pytest-dev/pytest-django/issues/698
2019-02-01 15:53:54 +01:00
Benjamin Dauvergne 8efca74775 manager: add ous export (#29162) 2019-01-31 15:05:13 +01:00
Benjamin Dauvergne 6f2b7f63bc manager: add roles export (fixes #29162) 2019-01-31 15:05:03 +01:00
Benjamin Dauvergne a26417bb76 tests: accept view name with login() (#29162) 2019-01-31 15:04:58 +01:00
Benjamin Dauvergne 002dff7acf data_transfer: add export context (#29162) 2019-01-31 15:04:56 +01:00
Benjamin Dauvergne 5815547369 tests: fix typo (#29162) 2019-01-31 15:04:51 +01:00
Frédéric Péters 6a8eed17d2 utils: add hook to decide if user can change/set password (fixes #28848) 2019-01-31 15:00:29 +01:00
Benjamin Dauvergne 1097339aeb setup.py: adopt a more PEP440 process to create version (fixes #29918) 2019-01-31 13:43:35 +01:00
Benjamin Dauvergne c52e23b5a7 manager: use get_table_data() to get queryset in ExportMixin (fixes #9414) 2019-01-31 13:16:08 +01:00
Benjamin Dauvergne fa28c50edc tests: do not use override_settings() at the class level
It's broken with pytest 4.2.0.
2019-01-31 12:53:39 +01:00
Emmanuel Cazenave 870bc65026 user export csv : exclude disabled attributes (#30103) 2019-01-25 15:29:50 +01:00
Emmanuel Cazenave c7f80a61d2 user export csv compatiblity with tablib < 0.11 (#30091) 2019-01-25 12:00:20 +01:00