Commit Graph

304 Commits

Author SHA1 Message Date
Benjamin Dauvergne 46b4bc8b6b views: do not set password on unlink for LDAP users (#24710) 2019-05-28 12:54:05 +02:00
Benjamin Dauvergne d4fd7173eb show change password link after user unlink (fixes #32953) 2019-05-16 18:13:18 +02:00
Benjamin Dauvergne 2da033c409 views: clean FranceConnect session variable on unlink (#32953) 2019-05-16 18:09:29 +02:00
Benjamin Dauvergne beca608c97 adapts to spring cleaning in authentic (#32866)
See #32934.
2019-05-15 16:03:47 +02:00
Benjamin Dauvergne 2746d095c5 py3ize obviously non-compatible code (#32866) 2019-05-09 14:02:40 +02:00
Benjamin Dauvergne 0077218685 improve code style (#32866)
- remove obviously dead code (reported by flake8)
- fix PEP8 violations
- rename variable using stdlib builtin names
- use get_version() from combo's setup.py
2019-05-09 14:02:40 +02:00
Benjamin Dauvergne e04459825c add copyright headers (#32866) 2019-05-09 14:02:40 +02:00
Benjamin Dauvergne 7f191e9bc6 tests: use pg_virtualenv with on jenkins (#27083) 2019-05-03 16:34:49 +02:00
Benjamin Dauvergne ce56e15d0b apps: hide password management link when FC authenticated (#27083)
It's done by implementing a2_hook_user_can_change_password on the
AppConfig object.
2019-05-03 16:34:49 +02:00
Christophe Siraut 1f7b1c6a58 debian: bump debhelper compatibility level (#32260) 2019-04-19 15:11:33 +02:00
Christophe Siraut 7ece61f49e debian: bump debhelper compatibility level (#32260) 2019-04-19 14:49:57 +02:00
Serghei Mihai edc3ffaade misc: rename authentication "frontend" to "authenticator" (#14475) 2019-03-19 09:40:04 +01:00
Frédéric Péters 8045695973 tox: limit django-jsonfield version to keep django 1.8 compatibility (#31482) 2019-03-17 18:15:27 +01:00
Benjamin Dauvergne 2360d4439e tox.ini: use pylint-django<=0.11.1 2019-01-19 18:03:43 +01:00
Frédéric Péters b0155b540a tox: limit pytest version to a version compatible with pytest-cov 2019-01-07 05:53:08 +01:00
Frédéric Péters 50c7236d90 templates: add alt texts to image links (#29408) 2019-01-02 17:29:04 +01:00
Frédéric Péters 5a20b28487 tests: adjust not to find link by label (#29228) 2019-01-02 17:26:04 +01:00
Frédéric Péters 7861f4a4f3 improve markup of login_registration template (#29228) 2019-01-02 15:26:08 +01:00
Benjamin Dauvergne 79995b127f views: search email case insensitively (fixes #29007) 2018-12-14 13:43:04 +01:00
Benjamin Dauvergne 806b4cdbab lock first name and last name (fixes #27044) 2018-11-29 21:14:05 +01:00
Benjamin Dauvergne dd43c144c5 utils: apply mapping to custom attributes before static ones (#27044)
It's impossible to set a verified first_name or last_name without it.
2018-11-29 21:14:05 +01:00
Serghei Mihai fa9c460eed center explanation text (#27182) 2018-10-10 10:12:12 +02:00
Benjamin Dauvergne 460def09da launch tests with Django 1.11 (fixes #27095) 2018-10-08 16:54:29 +02:00
Benjamin Dauvergne 7b2f4f2f9a configure build in Jenkins2 2018-10-08 12:41:51 +02:00
Benjamin Dauvergne 7a54118a4d views: pass service field to fc login post registration (fixes #21908) 2018-10-08 12:25:00 +02:00
Serghei Mihai 6ac87bad33 css: do not force button height (#25763) 2018-10-05 16:06:43 +02:00
Benjamin Dauvergne f8a8f21c51 add js files to sdist 2018-09-27 11:29:43 +02:00
Benjamin Dauvergne 771ae3ebbc tox: remove dead lines 2018-09-27 10:04:53 +02:00
Benjamin Dauvergne 5f854490c5 add missing close tag (#21908) 2018-09-26 23:30:48 +02:00
Benjamin Dauvergne 6429b3940c update french translation (#21908) 2018-09-21 09:21:39 +02:00
Benjamin Dauvergne 2e5ac496b8 keep authentication context (fixes #21908)
- simplify and reorganize login templates,
- URL are not built inside templates anymore,
- we have now 3 different templates:
  - login.html for the login page
  - registration.html for the registration page
  - linking.html for the account page
- using feature from #25623, authentication_method is kept by the
  registration view.
- the service slug is correctly threaded between every views.
- explanations about FranceConnect are now done in a common template
  "explanation.html".
- restore popup mode, use it through setting A2_FC_POPUP=True, it works
  for:
  - login and login with registration (workflow for login with
    registration is a bit complicated),
  - registration,
  - and linking (linking your existing to FC through the "My account"
   page)
  unlinking is not handled with a popup.
2018-09-18 17:54:36 +02:00
Frédéric Péters c21a16108a don't alter can_reset_password flag for users without an FC account (#25655) 2018-08-21 11:15:40 +02:00
Benjamin Dauvergne 9b8e493ded remove use of context_instance (fixes #25532)
context_instance is not passed anymore by authentic2, and giving
context_instance=None to render() prevent the request object to be feed
in the context of the template, breaking some templates.
2018-08-03 10:13:56 +02:00
Benjamin Dauvergne 681dcf3862 implement AppConfig.a2_hook_user_can_reset_password (fixes #25535)
It returns True if an user is linked to an FC account, it allows any
FC user to login to its account as long as it still has control of the
FC email even if he has lost its FC credentials.
2018-07-30 17:22:36 +02:00
Benjamin Dauvergne 5f77fbe75e do not set a password on FranceConnect users (#25535)
As user don't know this password they can never change it...
2018-07-30 17:22:36 +02:00
Emmanuel Cazenave d5df658f4b don't load authentic2 template tags (#25393) 2018-07-30 13:45:49 +02:00
Frédéric Péters daf3f20951 templates: merge duplicated class attributes (#25353) 2018-07-19 08:33:37 +02:00
Frédéric Péters 7bffc5011c misc: don't use addtoblock to insert fc.css (#25356) 2018-07-19 08:33:33 +02:00
Benjamin Dauvergne 0caece2bb6 tests: add tests on new password related functions (#24835)
- verify new users have a password set
- verify old users keep their password on linking and are not
  asked for a new password if they used their password for logging in.
2018-07-14 08:31:34 +02:00
Benjamin Dauvergne 631a86deec app_settings: set password to random value by default (#24835) 2018-07-14 08:31:34 +02:00
Benjamin Dauvergne a57a98cb5e views: ask for new passord on unlink only if logged using FC (#24835) 2018-07-14 08:31:34 +02:00
Benjamin Dauvergne f4fce3490f utils: fix typo in warning log (#24835) 2018-07-14 08:31:34 +02:00
Benjamin Dauvergne 186f3518d0 utils: add special case for mapping the User.password (fixes #24835)
The goal is to set a random password for new accounts,
so that they can recover it. In this case we use
the value {"compute": "random"}.
2018-07-14 08:31:34 +02:00
Josue Kouka 215c1f5abd use REQUESTS_PROXIES instead of A2_FC_REQUESTS_PROXIES (#24929) 2018-07-02 14:48:16 +02:00
Benjamin Dauvergne 38cc81860e tox.ini: remove limitation on psycopg2 versions (to work with pg 10.4) 2018-06-29 16:12:15 +02:00
Josue Kouka deebd83a60 add fc requests proxies support (#24713) 2018-06-29 15:05:20 +02:00
Benjamin Dauvergne 0a8628ae54 views: prevent None success URL in unlink view (fixes #24708)
Logout URL to FC can be None if the current session was not opened
through an FC authentication.
2018-06-22 15:39:50 +02:00
Benjamin Dauvergne 25d6187305 debian: required python-requests>2.11 (fixes #23518)
Previous versions do not accept a Retry() object passed to the
max_retries parameter of HTTPAdapter. It fixes a bug on debian
introduced by c701e610.
2018-06-13 10:09:16 +02:00
Benjamin Dauvergne 8df4f28123 utils: fix access to verified property of mappings (fixes #23271) 2018-04-26 15:43:20 +02:00
Elias Showk 2b2f8ca1b0 remove url patterns to support django 1.11 (#23270) 2018-04-18 15:43:33 +02:00