Commit graph

1982 commits

Author SHA1 Message Date
Tom Hughes
812f5b44e8 Redirect after saving settings in case the username has changed
Fixes #3059
2021-01-19 18:57:34 +00:00
Tom Hughes
0654be27f9 Fix new rubocop warnings 2021-01-11 19:17:31 +00:00
Tom Hughes
0ff89c31e4 Remove both Potlatch versions
Fixes #2622
2021-01-05 21:18:45 +00:00
Andy Allan
4f304e2301 Remove SystemTimer and use stdlib Timeout directly
SystemTimer was only needed on ruby 1.8, and we dropped support for
that a long time ago.
2020-12-23 14:25:58 +00:00
Tom Hughes
88ba316abe Merge remote-tracking branch 'upstream/pull/2999' 2020-12-09 14:51:04 +00:00
Sarah Hoffmann
a7b95e2a63 Improve guessing of labels for Nominatim results
This adapts to two changes in place handling by Nominatim:

* Place links that are computed by Nominatim are now found in
  extratags['linked_places']. Keep the check for extratags['place']
  as this may contain an explicitly mapped place label.
* Use address rank for guessing the admin level. This gets normalised
  by Nominatim with respect to country-specific use of admin_level.

Also adds additional labels for admin levels, so that we now have
complete coverage for all levels that are in use in OSM.
2020-12-01 22:52:40 +01:00
Tom Hughes
582402ba8f Prefer keyword arguments when method has optional boolean arguments 2020-11-13 10:22:55 +00:00
Andy Allan
78b9d92207 Prefer keyword arguments when method has optional boolean arguments 2020-11-12 11:24:44 +00:00
Andy Allan
e6d7da3a62 Preload traces for the selected points
It doesn't make a huge difference, since rails caches all the results
of the queries generated by point.trace lookups, but at least it cuts
down on the logs.
2020-11-11 17:52:33 +00:00
Andy Allan
a15a3744da Use point.trace instead of an additional gpx_file variable
Every point knows which trace it's associated with, so there's no
need to search for it separately
2020-11-11 17:51:52 +00:00
Tom Hughes
20ce10a9ef Allow redirects to authentication services from the settings page
Chrome and Safari require redirects to match the form-action rule
as well as the original submission address.
2020-10-29 21:29:35 +00:00
Andy Allan
2559226be3 Avoid various uses of html_safe
We can avoid using `html_safe` in various circumstances, through alternative approaches like i18n keys ending in `_html` or using `safe_join` to avoid converting via unsafe string types.

The `_html` keys approach only work for ActionView helper version of `t`, not the base `I18n.t` method.
2020-10-21 15:43:14 +02:00
Andy Allan
2c1033f62d Rename Notifier to UserMailer
It's a convention in rails to name your mailers with a Mailer suffix, and is also common to name the class after the recipient (e.g. User, Admin). So UserMailer seems a reasonable choice.
2020-10-14 15:04:58 +02:00
Tom Hughes
ddac660f3b Merge remote-tracking branch 'upstream/pull/2839' 2020-09-30 11:54:30 +01:00
Tom Hughes
7db541d697 Invalidate existing sessions when changing email or password
As we don't have any way to actually find the active sessions for
an account we instead store a fingerprint in the session, and refuse
to use any session with a different fingerprint.
2020-09-29 14:34:08 +01:00
Tom Hughes
c694c78c9a Delete any outstanding tokens when a user changes their email
This ensures that any tokens previously sent to the old email address
can no longer be used if somebody were able to access that address.
2020-09-29 13:47:40 +01:00
Andy Allan
f70ec18989
Merge pull request #2809 from tomhughes/bootstrap
Convert some more forms to use bootstrap
2020-09-16 10:43:21 +02:00
Tom Hughes
70c4a750d7 Fix new rubocop warnings 2020-09-16 08:28:25 +01:00
Tom Hughes
18b9b9f14c Fix new rubocop warnings 2020-09-07 07:11:22 +01:00
mmd-osm
0fb725ea61 API User details JSON format 2020-09-06 22:11:23 +02:00
Tom Hughes
21adea321b Convert password reset forms to use bootstrap 2020-09-04 00:36:43 +01:00
Tom Hughes
c2af89c00e Fix rubocop Style/SoleNestedConditional warnings 2020-09-02 18:54:55 +01:00
Tom Hughes
b7432e9432 Handle new rubocop warnings 2020-09-02 07:18:21 +01:00
Tom Hughes
8d34b03232 Only show the "too many messages" error once
Fixes #2790
2020-08-23 10:41:39 +01:00
Tom Hughes
abca51e4d8 Fix some Style/StringConcatenation warnings 2020-08-09 19:48:16 +01:00
Tom Hughes
75e135869e Fix Style/ExplicitBlockArgument warnings 2020-08-09 19:06:04 +01:00
Tom Hughes
ea59d95f4a Fix some new rubocop warnings 2020-08-06 22:27:30 +01:00
Tom Hughes
0e2a66e8de Fix new rubocop warnings 2020-08-06 18:42:16 +01:00
Tom Hughes
2d3972249c Fix some rubocop todos 2020-08-02 19:38:58 +01:00
Tom Hughes
f881a8c83c Register warning and error flash types
Fixes #2743
2020-08-02 15:53:13 +01:00
Tom Hughes
77f9aec772 Fix some rubocop todos 2020-07-31 22:45:53 +01:00
Tom Hughes
d4130bcac8 Fix the Redirect warnings from Brakeman
Unfortunately I've had to leave the check disabed as Brakeman
can't see inside the safe_referer method so doesn't realise that
it is cleaning the referer.
2020-07-22 19:23:46 +01:00
Tom Hughes
77bece20ff Merge remote-tracking branch 'upstream/pull/2700' 2020-07-08 18:43:26 +01:00
Andy Allan
8c326a6c1f Remove unnecessary layout calls from api controllers
These were left over from the refactoring of the controllers into api and non-api versions.
2020-07-08 18:51:27 +02:00
Andy Allan
41d6f19a6b Rename the notes#mine action to index 2020-07-08 18:43:30 +02:00
Tom Hughes
9f993fe8c8 Fix new rubocop warnings 2020-07-07 10:44:52 +01:00
Tom Hughes
96ee7ef95c Only report traces as offline when they are offline 2020-07-07 10:37:56 +01:00
Tom Hughes
ce99bfd9ac Remove some debug logging comitted by mistake 2020-07-07 10:37:39 +01:00
Tom Hughes
2def62ee19 Fix errors with GPX offline mode 2020-07-05 14:49:12 +01:00
Andy Allan
600812f6ad Rework user#set_status and #delete to avoid GET requests
This renames the delete action to destroy, and starts using resourceful
routing for user actions.
2020-06-10 11:49:18 +02:00
Tom Hughes
d6f518f627 More improvements to locale selection for the data browser
Use the browser language preferences for non-logged in users.
2020-06-07 19:10:48 +01:00
Tom Hughes
293fe68eff Merge remote-tracking branch 'upstream/pull/2642' 2020-06-04 17:40:13 +01:00
Tom Hughes
c9f9ade96f Fix new rubocop warnings 2020-06-03 17:47:35 +01:00
Andy Allan
3786366fdc Rename friend to friendship in notifier
Followup to #2269
2020-06-03 18:29:08 +02:00
Andy Allan
8ebfdbc1ff Move make_friend and remove_friend to friendships controller 2020-06-03 18:23:07 +02:00
Tom Hughes
f3219ada14 Fix new rubocop warnings 2020-05-12 19:18:45 +01:00
Tom Hughes
03cde71a5e Refactor more controller tests 2020-04-26 20:33:06 +01:00
Tom Hughes
359d76c8f0 Redirect to the error page for non-existent issues 2020-04-22 12:37:56 +01:00
Tom Hughes
66ec3cd845 Add blob to frame-src in CSP for iD
Fixes #2582
Closes #2583
2020-04-09 18:43:12 +01:00
Tom Hughes
b5c778b662 Fix new rubocop warnings 2020-03-31 19:08:10 +01:00