Commit Graph

5013 Commits

Author SHA1 Message Date
Benjamin Dauvergne 5c2c4fc7de dj22: use_for_related_fields is deprecated[2] (#41238)
We must declarer all_objects as base manager for the Attribute model,
without it we cannot load then save disabled attributes.
2020-04-28 00:17:46 +02:00
Benjamin Dauvergne b439593203 auth_fc: make user and sub relatively unique (#19959)
As we are not sure they are unique in all deployments, we make them
unique relative to a new order integer field. New federations with
FranceConnect with be forced to have the column order to be 0, making
them unique.
2020-04-27 18:09:03 +02:00
Benjamin Dauvergne 466604122e tests: use migration fixture in idp_oidc migration's tests (#19959) 2020-04-27 18:00:32 +02:00
Benjamin Dauvergne a1b527f701 tests: add a migration fixture (#19959)
To help in testing migrations.
2020-04-27 17:58:35 +02:00
Paul Marillonnet df3e0e79de tox: add django 2.2 / DRF 3.4 / DRF 3.9 test venv (#41238) 2020-04-27 16:12:58 +02:00
Benjamin Dauvergne dd80c4722d tests: fix warning about regexp syntax (#41238)
Regexps must use r'' strings.
2020-04-27 16:12:58 +02:00
Benjamin Dauvergne 1c14ad5bf7 misc: fix deprecation warning from django-filter (#41238)
MigrationNotice: `UsersAPI.filter_class` attribute should be renamed
  `filterset_class`. See:
  https://django-filter.readthedocs.io/en/master/guide/migration.html
  filterset_class = self.get_filterset_class(view, queryset)
2020-04-27 16:12:58 +02:00
Benjamin Dauvergne c41e57954f misc: fix deprecation warning (#41238)
django.utils.deprecation.RemovedInDjango30Warning: Remove the context
   parameter from MultiSelectField.from_db_value(). Support for it will be
   removed in Django 3.0.
2020-04-27 16:12:58 +02:00
Benjamin Dauvergne 1be25fc287 csv_import: fix python-attr deprecation warning (#41238)
DeprecationWarning: The usage of `cmp` is deprecated and will be
  removed on or after 2021-06-01.  Please use `eq` and `order` instead.
2020-04-27 16:12:58 +02:00
Benjamin Dauvergne 4d57434993 setup.py: allow DRF 3.9 (#41238) 2020-04-27 16:12:55 +02:00
Benjamin Dauvergne b5e2134c14 misc: prevent leak of file descriptor in CsvImporter.run() (#41238) 2020-04-27 16:12:55 +02:00
Benjamin Dauvergne 7f4094161e misc: prevent leak of file descriptors in commands (#41238)
In load-ldif, oidc-register-issuer and sync-metadata.
2020-04-27 16:12:55 +02:00
Benjamin Dauvergne 0fd28cf967 tests: fix warnings in tests (#41238)
- replace uses of assert*Equals by assert*Equal
- prevent leak of file descriptors
2020-04-27 16:12:55 +02:00
Benjamin Dauvergne 7ed991a4ba tests: rename skipUnless to skipif (#41238)
skipUnless() is the name of the equivalent functionality in unittest, in
pytest it's named skipif().
2020-04-27 16:12:55 +02:00
Benjamin Dauvergne d2b6f6669b py3: fix warning about inspect.getargspec (#41238) 2020-04-27 16:12:55 +02:00
Benjamin Dauvergne b886f872e5 misc: limit imports at plugin loading time (#41238)
It hides other errors as it's done before Django initialization (at
settings loading time).
2020-04-27 16:12:55 +02:00
Benjamin Dauvergne b884c1422d drf: verify authenticate_credentials() signature (#41238) 2020-04-27 16:12:55 +02:00
Benjamin Dauvergne bdeb86cd2c drf: implement action decorator for version 3.4 (#41238) 2020-04-27 16:12:55 +02:00
Benjamin Dauvergne 9aa91ecc7b dj22: use_for_related_fields is deprecated (#41238) 2020-04-27 16:12:52 +02:00
Benjamin Dauvergne 5d70e3245c drf: make test less dependent on DRF error message (#41238) 2020-04-27 14:34:56 +02:00
Paul Marillonnet b4e7a0423e allow for django 2.2 in setup file (#41238) 2020-04-27 14:34:56 +02:00
Paul Marillonnet f84353df53 a2_rbac: fix UniqueBooleanField prep value for db lookup (#41238) 2020-04-27 14:34:56 +02:00
Paul Marillonnet 1237d7fe26 auth_migrations: drop obsolete & broken unicity constraint (#41238) 2020-04-27 14:34:56 +02:00
Paul Marillonnet d442269653 auth_fc: fix inconsistency in password-reset testing (#41238) 2020-04-27 14:34:56 +02:00
Paul Marillonnet 0e4d0ec4c0 auth: fix backends' authn method signature (#41238) 2020-04-27 14:34:56 +02:00
Paul Marillonnet 286309cd10 import_export_site: disable prompt confirmation testing (#41238) 2020-04-27 14:34:56 +02:00
Paul Marillonnet c68258513e setup: more recent django-filter version (#41238) 2020-04-27 14:34:56 +02:00
Paul Marillonnet d6a27af830 idp_oidc: error message variations in tests (#41238) 2020-04-27 14:34:56 +02:00
Paul Marillonnet 6ac5e1646a auth_fc: http util signature variation (#41238) 2020-04-27 14:34:56 +02:00
Paul Marillonnet 1e86d76cf0 dj2.2: discard unexisting Media.add_js method (#41238) 2020-04-27 14:34:56 +02:00
Paul Marillonnet 1da5389209 dj2.2: user.is_authenticated is not a callable anymore (#41238) 2020-04-27 14:34:56 +02:00
Paul Marillonnet d178b22d51 dj2.2: user.is_anonymous is not a callable anymore (#41238) 2020-04-27 14:34:55 +02:00
Paul Marillonnet c0b3dfb36e dj2.2: proper use of lazy decorator (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet 400b761024 api: do not exclude declared readonly fields from serializer (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet 926ab0eb42 drf: allow for more recent drf version (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet 67725c8f5f drf: handle api changes in authn class (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet eb9f4e4b7a dj2.2: handle widget.render signature changes (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet a0bb0d6027 misc: add missing import (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet 35c8fda6ff dj2.2: admin site urls inclusion (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet 8526179970 dj2.2: use i18n javascript catalog cbv (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet 6c3b3ff258 dj2.2: use compat django auth CBVs (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet bcda3ae1dc dj2.2: handle api change in django.db.models.options (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet 9f3705fbae dj2.2: avoid direct assignment on m2m (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet 7be097f200 dj2.2: kwarg fix on field initialization (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet 5836e2e581 dj2.2: remove duplicate auth_migration module (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet 4897a2f551 dj2.2: do not set temporary PKs as nullable ever (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet a1d3af0eae drf: use 'action' decorator (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet ca4d162434 dj2.2: handle 'allow_lazy' import variations (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet 8804de70b7 dj2:2: fix 'reverse' import (#41238) 2020-04-27 14:34:24 +02:00
Paul Marillonnet bfbb22bd44 dj2.2: cascade on delete (#41238) 2020-04-27 14:34:24 +02:00