Commit graph

16 commits

Author SHA1 Message Date
simon lehericey
eaef5c7e39
readapt name and logic 2024-09-04 08:08:01 +00:00
Kara Diaby
b6d0502f39
modifications après dernière review 2024-09-04 08:05:54 +00:00
Kara Diaby
a4b8d816de
Tests 2024-09-04 08:05:53 +00:00
Colin Darie
77fb0553fc
chore: enable freeze string literals by comment 2024-08-22 09:26:48 +02:00
simon lehericey
fa06d17169
Feat(user): set email_verified_at when setting confirmed_at 2024-05-27 17:24:56 +02:00
simon lehericey
f6879eba60 associate_user take a target email 2021-10-14 14:47:50 +02:00
simon lehericey
09f828a6a2 create_merge_token! 2021-10-14 14:47:50 +02:00
simon lehericey
34862f41e0 Add fci valid_for_merge 2021-10-14 14:47:50 +02:00
simon lehericey
6826bf03b0 Sign in with a user linked by france connect sub (openid)
instead of looking linked user by email because :

- follows FC recommendation to fetch ds account by openid
- the email is not a valid key as many user can share the same FCI email.

The following scenario is now working

A user A (email: 1@mail.com) uses FC to connect to DS
=> It is connected as 1@mail.com

Another user B (email: generic@mail.com) uses FC to connect
=> It is connected as generic@mail.com

The first user A change its FC email to generic@mail.com and connect to DS
=> It is still connected as 1@mail.com
2021-10-14 14:47:50 +02:00
simon lehericey
e18fb116c6 cannot create fci without user 2021-05-05 14:36:34 +02:00
Christophe Robillard
a288a13805 disable france connect authentication for admin and instructeurs 2021-02-10 18:13:47 +01:00
Pierre de La Morinerie
4cb747fdb6 specs: always require rails_helper
Test helpers are separated between two files: spec_helper and
rails_helper. This separation is meant to allow tests that do not
require Rails (like testing standalone libs) to boot faster.

The spec_helper file is always loaded, through `--require spec_helper`
in the `.rspec` config file. When needed, the rails_helper file is
expected to be required manually.

This is fine, but:
- Many test files have a redundant `require 'spec_helper'` line;
- Many test files should require `rails_helper`, but don't.

Not requiring `rails_helper` will cause the Rails-concerned section of
the test environment not to be configured–which may cause subtle bugs
(like the test database not being properly initialized).

Moreover, Spring loads all the Rails files on preloading anyway. So the
gains from using only `spec_helper` are thin.

To streamline this process, this commit:
- Configures `.rspec` to require `rails_helper` by default;
- Remove all manual requires to spec_helper or rails_helper.

Reference: https://stackoverflow.com/questions/24145329/how-is-spec-rails-helper-rb-different-from-spec-spec-helper-rb-do-i-need-it
2020-03-31 12:48:32 +02:00
simon lehericey
7024e14d1c FC information: remove funny find_by 2018-01-15 17:14:12 +01:00
gregoirenovel
9666ed7d5d Remove useless tests 2017-07-19 13:32:59 +02:00
Xavier J
a5a95abf06 Fix test for all Model 2016-11-14 18:36:09 +01:00
Xavier J
4d812220fd - Add FranceConnectInformation table to make safe FranceConnect pivot identity.
- Adapt source code with the new table
2016-01-21 17:06:09 +01:00