Commit graph

80 commits

Author SHA1 Message Date
Milan Cvetkovic
ad164d384e Change provider name to "microsoft" 2023-08-20 10:19:30 +01:00
Milan Cvetkovic
b3e13eb752 Update tests for microsoft_graph endpoints 2023-08-20 10:17:42 +01:00
Milan Cvetkovic
7428da74c2 Use omniauth-microsoft_graph instead of omniauth-windowslive
Omniauth-microsoft_graph correctly populates 'email' and 'name' fields used by OpenStreetMap.
It also  uses updated endpoints for Microsoft identity provider.

Use email address returned by microsoft_graph provider as a verified address.

Upgrading exisiting users from windowslive to microsoft_graph:
 - upon next login existing `windowslive` users will have to authorizei
   OpenStreetMap application to "Read Your Profile," required for proper reading
   of display name field.

The name of the identity provider in OSM is kept to 'windowslive':
 - the entries in users table with `provider == 'windowslive'`
   can be reused for microsoft_graph provider, since
   the uid field is preserved. Users will not need to repeat the sign up process.
 - OAuth2 callback is still `/auth/windowslive`, no updates to Microsoft Identity Provider portal
   App registration are necessary.
2023-08-17 13:01:15 +00:00
Tom Hughes
f4749eccf1 Test that verified emails from OAuth signups are accepted automatically 2022-07-26 17:33:59 +01:00
Andy Allan
934d81aa55 Bootstrap 5: Replace all form-group classes with mb-3 2022-07-20 14:42:57 +01:00
Tom Hughes
f6818bb2ed Avoid accidental locale changes in tests 2021-06-22 19:05:55 +01:00
Tom Hughes
63e4a89323 Fix new ruboop warnings 2021-06-22 18:34:15 +01:00
Andy Allan
094d6c8bb9 Move confirmation methods into ConfirmationsController 2021-04-07 16:05:32 +01:00
Tom Hughes
5912a8011b Update to Omniauth 2.x
This requires converting all use of the /auth endpoints
to use the POST method as GET is no longer supported.
2021-02-02 19:49:03 +00:00
Andy Allan
cc8bb7c6a5 Refactor user registration form to use bootstrap 2021-01-20 15:38:10 +00:00
Andy Allan
da2277505f Ensure that test utility methods are marked as private
This allows us to enable the check for test method names.
2020-10-28 11:49:01 +01:00
Tom Hughes
bf22c69286 Improve locale selection algorithm
Don't include locales which only have rails translations in
the candidates, and ensure that user specified options take
priority over less specific variants of earlier choices.
2020-06-04 17:33:11 +01:00
Andy Allan
f885cfe0f5 Rename form-row to standard-form-row to avoid clashing with a bootstrap class 2020-01-15 17:16:11 +01:00
Tom Hughes
473da378b7 Remove fallback to hostip.info
We haven't used hostip.info in production for years, except
for when we did so by accident, leading to a two hour partial
outage when it went down.
2020-01-06 19:14:12 +00:00
Andy Allan
c4c1f8ded3 Reformat params hashes to avoid super-long lines 2019-12-18 15:58:37 +01:00
Simon Poole
b89e6c2274 Update user_creation_test for new parameter 2019-05-13 16:54:29 +02:00
Simon Poole
e30813bbb1 Rubocop fixes and increase per method complexity limit from 23 to 25 2019-05-13 16:54:29 +02:00
Simon Poole
51c84869c4 Fix tests for change in users_controller, add test for missing read_tou 2019-05-13 16:54:29 +02:00
Andy Allan
b54362d458 Use deliver_later for all email sending 2018-10-31 16:38:12 +01:00
Andy Allan
3ec67ea2d3 Rename user_controller to users_controller 2018-10-03 15:31:10 +02:00
Wil
a182820139 Resolve 96 Rubocop Lint/AmbiguousRegexpLiteral conflicts 2018-09-10 11:28:16 +08:00
Tom Hughes
03408b6294 Update get/post etc to remove use of deprecated syntax 2017-06-27 08:26:44 +01:00
Tom Hughes
07673278f1 Remove deprecated get_via_direct and post_via_redirect methods 2017-06-06 00:03:39 +01:00
Tom Hughes
95eda2d381 Update bundle 2017-06-02 00:08:30 +01:00
Andy Allan
1a1d924ae0 Use user factory for user_creation test. 2017-03-10 10:57:46 +00:00
Tom Hughes
f8f7cc4628 Update to rails 4.2.8 2017-02-23 21:18:57 +00:00
Tom Hughes
c7dc3ee722 Use .first in place of [0] 2017-02-05 13:57:25 +00:00
Herve Saint-Amand
0449024ca0 Modify tests to search only text parts
The tests assumed that every part in the multipart emails that we send were either plain text or HTML. Now we have image attachments, against whose contents the tests were still trying to match regexes. The tests have been modified to only run regexes on the text parts of the mails.
2017-01-11 23:17:24 +00:00
Tom Hughes
69b967c9ff Add support for Wikimedia authentication
Closes #1146
2016-12-20 22:32:25 +00:00
Andy Allan
90175c3bdb Stub out requests to gravatar.com during tests. 2016-10-30 10:28:58 +01:00
Tom Hughes
c70a1fe933 Add support for GitHub authentication 2016-07-14 09:40:45 +01:00
Tom Hughes
8fe1899596 Fix rubocop warnings 2016-01-19 09:51:24 +00:00
Tom Hughes
2ef6a960d1 Update bundle 2016-01-19 09:51:23 +00:00
Tom Hughes
4028f4cdb9 Rework locale selection
Implement our own matching algorithm rather than trying to
patch the http_accept_language one and make sure everything is
using it in a consistent way.

Fixes #1125
2016-01-06 18:43:25 +00:00
Tom Hughes
e07890a2ad Remove bogus mock data from facebook and windowslive tests 2015-06-08 16:27:04 +01:00
Tom Hughes
2b2264ddab Add support for Windows Live authentication 2015-05-19 14:04:09 +01:00
Tom Hughes
c9893e186b Add support for Facebook authentication 2015-05-19 14:04:08 +01:00
Tom Hughes
ddaf43bc0e Add tests for Google OAuth authentication 2015-04-14 10:08:07 +01:00
Tom Hughes
9f263dd9c3 Reset the locale after tests that may change it 2015-03-09 00:15:05 +00:00
Tom Hughes
e434cb154c Convert OpenID authentication to generic third party authentication 2015-02-25 01:07:23 +00:00
Tom Hughes
eaf4b32a7f Rework OpenID tests for new flows using OmniAuth mocking 2015-02-25 01:07:23 +00:00
Tom Hughes
dc2a2c8ebd Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
Tom Hughes
baf10cd392 Fix rubocop lint issues 2015-02-20 08:56:16 +00:00
Tom Hughes
ef7f3d800c Fix most auto-correctable rubocop issues 2015-02-20 08:56:16 +00:00
Tom Hughes
84c802d1a9 Use correct URL 2015-01-10 17:40:55 +00:00
Tom Hughes
c8a23f07db Fix typo 2014-05-24 17:34:19 +01:00
Tom Hughes
98184dfb9c Reorganise tests to match modern rails test layout 2014-02-26 00:13:19 +00:00
Tom Hughes
933b091330 Highlight erroneous fields by adding a class to them
The default rails scheme for highlighting errors is to wrap the
field in a div, but that changes the structure of the page and can
change the meaning of CSS rules applied to the fields.

As an alternative we now apply a class to the fields, and use that
in the CSS to apply a highlight.
2014-01-15 21:41:16 +00:00
Tom Hughes
d8399d3e18 IntegrationTest is now in ActionDispatch not ActionController 2013-09-21 11:35:46 +01:00
John Firebaugh
2a3bc0a387 Hook up user confirmation page 2013-08-12 13:34:44 -07:00