Commit Graph

4571 Commits

Author SHA1 Message Date
Paul Marillonnet 5219ac1f10 add missing migration files (#33745)
gitea/authentic/pipeline/head Build started... Details
2019-06-07 10:28:20 +02:00
Thomas NOËL a083fb5367 auth_saml: add missing mellon base template (#33743) 2019-06-06 12:07:00 +02:00
Frédéric Péters 4d18e9dfa2 misc: remove "you have been logged out" message (#33703) 2019-06-05 19:19:34 +02:00
Frédéric Péters b960e14fed misc: redirect user to homepage after password reset (#33611) 2019-06-03 14:13:59 +02:00
Frédéric Péters bedcbc5a4c registration: add a note about spams (#27097) 2019-06-03 14:13:59 +02:00
Benjamin Dauvergne 59c913ee46 static: track password change with "input" event (#33571) 2019-05-31 15:03:20 +02:00
Benjamin Dauvergne 7eda057909 integrate authentic2-auth-fc in packaging (#20852) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 30dc69eeb5 views: do not set password on unlink for LDAP users (#24710) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 11dccefc81 show change password link after user unlink (fixes #32953) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 95d59c86d0 views: clean FranceConnect session variable on unlink (#32953) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 1c40ec3f41 adapts to spring cleaning in authentic (#32866)
See #32934.
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 338b02cd99 py3ize obviously non-compatible code (#32866) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 8d27718f51 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-31 14:51:55 +02:00
Benjamin Dauvergne 72d48a8326 add copyright headers (#32866) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 3ca5c43a73 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-31 14:51:55 +02:00
Serghei Mihai ffc66bcbfa misc: rename authentication "frontend" to "authenticator" (#14475) 2019-05-31 14:51:55 +02:00
Frédéric Péters a8c3559f87 templates: add alt texts to image links (#29408) 2019-05-31 14:51:55 +02:00
Frédéric Péters 2ea59ce790 tests: adjust not to find link by label (#29228) 2019-05-31 14:51:55 +02:00
Frédéric Péters 4fbe554bb0 improve markup of login_registration template (#29228) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 0525533f85 views: search email case insensitively (fixes #29007) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 483b0dce96 lock first name and last name (fixes #27044) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne d082fb4998 utils: apply mapping to custom attributes before static ones (#27044)
It's impossible to set a verified first_name or last_name without it.
2019-05-31 14:51:55 +02:00
Serghei Mihai 517dad7553 center explanation text (#27182) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 1b8ee0a38a launch tests with Django 1.11 (fixes #27095) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 929b58d989 views: pass service field to fc login post registration (fixes #21908) 2019-05-31 14:51:55 +02:00
Serghei Mihai 18ce5d5b15 css: do not force button height (#25763) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne d3c163a62e add missing close tag (#21908) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne a9823e5a71 update french translation (#21908) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne a041be4668 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.
2019-05-31 14:51:55 +02:00
Frédéric Péters 06d4e913fe don't alter can_reset_password flag for users without an FC account (#25655) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne c4eade4d96 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.
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne e78fbbd68d 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.
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 54edc159b2 do not set a password on FranceConnect users (#25535)
As user don't know this password they can never change it...
2019-05-31 14:51:55 +02:00
Emmanuel Cazenave 87e2a5fb75 don't load authentic2 template tags (#25393) 2019-05-31 14:51:55 +02:00
Frédéric Péters 126dbd1656 templates: merge duplicated class attributes (#25353) 2019-05-31 14:51:55 +02:00
Frédéric Péters 3340c52c09 misc: don't use addtoblock to insert fc.css (#25356) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne b8efc1a645 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.
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 90eefd42eb app_settings: set password to random value by default (#24835) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 1995891e5f views: ask for new passord on unlink only if logged using FC (#24835) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 2522e75b5b utils: fix typo in warning log (#24835) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne c7521da95a 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"}.
2019-05-31 14:51:55 +02:00
Josue Kouka 58a10db62c use REQUESTS_PROXIES instead of A2_FC_REQUESTS_PROXIES (#24929) 2019-05-31 14:51:55 +02:00
Josue Kouka 6b424ded2f add fc requests proxies support (#24713) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne e688ba4076 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.
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne db85ba1e37 utils: fix access to verified property of mappings (fixes #23271) 2019-05-31 14:51:55 +02:00
Elias Showk 5ea5056f09 remove url patterns to support django 1.11 (#23270) 2019-05-31 14:51:55 +02:00
Frédéric Péters 21b4f96e8d do not allow unauthenticated access to unlink page (fixes #22405) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 1008ebb4e8 api: add franceconnect information to user's API when ?full is used (fixes #21962)
The following field is added to user's attributes if FC plugin is
enabled and the "full" parameter is given to the user's API:

   "franceconnect": {
      "linked": true,
      "link_url": "https://idp/accounts/fc/callback/",
      "unlink_url": "https://idp/accounts/fc/unlink/"
   }
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 10337ad952 locale: update french translations for release 0.10 (fixes #21874)
email was replaced by « adresse de courriel » everywhere.
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne c0f2d4d940 views: show warning to users with a mail linked to another FC account (fixes #21292)
The warning will help them connect their FC account to normally
registered account.
2019-05-31 14:51:55 +02:00