Commit graph

9243 commits

Author SHA1 Message Date
Andy Allan
4395b79bf7 Move notifier.rb into app/mailers
This is the expected location for mailers
2018-10-31 17:19:18 +01:00
Andy Allan
b54362d458 Use deliver_later for all email sending 2018-10-31 16:38:12 +01:00
Andy Allan
801522c5c3 Set up Delayed Job as the backend for Active Job
This persists jobs into the database, and uses locking to ensure that
workers from multiple machines avoid treading on each other.

Jobs can be run by using `bundle exec rake jobs:work`

Fixes #2015
2018-10-31 15:31:32 +01:00
Andy Allan
7a177cb03f Fix error messages when users should not be able to do things 2018-10-31 11:42:49 +01:00
Andy Allan
41619593df Add testing for moderator users and issues 2018-10-31 11:41:32 +01:00
Andy Allan
149c07fd2b Remove unnecessary token granting from the user_preferences tests
Sufficient permissions are granted by the basic authorisation, so this
isn't testing anything.
2018-10-31 11:36:24 +01:00
Andy Allan
f11221f05b Merge branch 'master' into cancancan 2018-10-31 11:16:47 +01:00
Tom Hughes
82f3dc6823 Convert some model mixins to concerns 2018-10-29 19:14:55 +00:00
Tom Hughes
ad85a03e21 Update mailmap 2018-10-29 12:48:32 +00:00
Tom Hughes
22af018298 Update translation keys for renaming of user to users 2018-10-29 12:48:20 +00:00
translatewiki.net
d75a09f5bb Localisation updates from https://translatewiki.net. 2018-10-29 08:12:55 +01:00
translatewiki.net
03419e1cc4 Localisation updates from https://translatewiki.net. 2018-10-25 10:31:58 +02:00
Andy Allan
0888f43d7b Check the oauth token and then use the capabilities directly 2018-10-24 16:48:54 +02:00
Andy Allan
71b21ec473 Rework capabilities to avoid assumptions about missing tokens
The logic about missing tokens implying logged in users (and that
all logged in users have access to any method protected by a token
capability) is correct. However, I believe it is both confusing and
brittle, and leaves a security-related door ajar for future foot-gun
incidents.

Instead, apply Abilities as normal, and keep the Capabilities
involvement only for situations where a token is provided. This
reduces the cognitive burden when considering Abilities in isolation.
2018-10-24 12:07:00 +02:00
Andy Allan
a50ad1c895 Rework the default denied access handler to give different responses to tokens, logged in users and other users 2018-10-24 09:39:02 +02:00
Tom Hughes
a5124ed409 Update translation keys for renaming of user to users
Fixes #2031
2018-10-22 11:00:03 +01:00
Christopher Bazin
248f63f728 Enable line breaks in performatted text within rich text
This stops redaction details being truncated at the edge of the
page when they have long lines of preformatted text.

Also use a div instead of a paragraph for redaction details so
that formatting is consistent with other rich text blocks.

Closes #1885
Fixes #1845
2018-10-22 10:44:16 +01:00
translatewiki.net
4f67b43388 Localisation updates from https://translatewiki.net. 2018-10-22 08:08:50 +02:00
Simon Poole
07ffb4c3f6 Calculate bounding box when deleting relations
Closes #2030
Fixes #2020
2018-10-21 19:32:12 +01:00
translatewiki.net
51b82a34f8 Localisation updates from https://translatewiki.net. 2018-10-18 08:27:45 +02:00
superDoss
3a1a17b522 Avoid swapping min and max longitude in RTL mode
Closes #2027
2018-10-17 22:31:08 +01:00
Andy Allan
ce761b3193 Combine site permissions declarations 2018-10-17 13:33:47 +02:00
translatewiki.net
766b53c397 Localisation updates from https://translatewiki.net. 2018-10-15 09:35:52 +02:00
Andrew Harvey
9da461cc2e add australia copyright notice for PSMA Australia 2018-10-14 23:10:30 +11:00
Tom Hughes
6b194ed627 Resize change bounding boxes on a zoom change 2018-10-14 12:28:26 +01:00
Tom Hughes
5e76ec80ce Enable automatic translation export in the test environment
Fixes #2016
2018-10-11 19:14:55 +01:00
Tom Hughes
091818da5d Adjust minimum changeset bbox to 20 pixels 2018-10-11 18:52:00 +01:00
Tom Hughes
bdcc33ae7f Improve variable naming 2018-10-11 18:51:45 +01:00
Tom Hughes
1aa63d92bc Merge remote-tracking branch 'upstream/pull/2018' 2018-10-11 18:47:47 +01:00
Tom Hughes
aef5273e95 Tidy up notes#search 2018-10-11 18:32:31 +01:00
Tom Hughes
db13180c70 Use "user" as user id parameter for notes searches 2018-10-11 18:30:53 +01:00
Tom Hughes
57095bc6c0 Merge remote-tracking branch 'upstream/pull/1955' 2018-10-11 17:41:47 +01:00
Tom Hughes
45c464a69a Suppress changeset pagination for inactive users
Fixes #2024
2018-10-11 09:39:56 +01:00
translatewiki.net
883e5e17b9 Localisation updates from https://translatewiki.net. 2018-10-11 09:13:43 +02:00
ENT8R
caef5828f4
Fix Rubocop issue 2018-10-11 08:36:13 +02:00
ENT8R
b19e424112
Fix some issues and improve code 2018-10-10 19:29:11 +02:00
Andy Allan
b7baa2c10a Remove temporary development code 2018-10-10 16:54:16 +02:00
Andy Allan
8360f275f9 Refactor to show the Issues link based on the calculated permissions 2018-10-10 16:42:01 +02:00
Andy Allan
dfb9e40820 Move issues and reports to authorization system 2018-10-10 16:34:44 +02:00
Andy Allan
901c29a820 Fix typo in method name 2018-10-10 11:55:00 +02:00
Andy Allan
fb2c1f6cfd Refactor site#welcome to use abilities instead of require_user 2018-10-10 11:49:45 +02:00
Andy Allan
f8f7ab1568 Change abilities based on upstream renamings 2018-10-10 11:41:16 +02:00
Andy Allan
420a7289a0 Merge branch 'authz' of https://github.com/rubyforgood/openstreetmap-website into rubyforgood-authz 2018-10-10 11:26:30 +02:00
Tom Hughes
4530f6e3e4 Make paragraph breaks more visible in changeset and note comments
Fixes #2022
2018-10-09 15:15:15 +01:00
ENT8R
0859748815
Fix Rubocop issue 2018-10-09 14:50:55 +02:00
ENT8R
3cdf4f3686
Fix an issue where the query did not work if a display name or an id was specified 2018-10-09 14:37:55 +02:00
ENT8R
083500f056 Merge branch 'master' into notes-search 2018-10-09 11:41:22 +02:00
translatewiki.net
1c59d4a776 Localisation updates from https://translatewiki.net. 2018-10-09 10:29:33 +02:00
J Guthrie
31c4461766 Converted to dot notation - fixes jshint 2018-10-07 00:52:11 +01:00
J Guthrie
e976f316b7 Convert degrees min-width to pixels min-width 2018-10-07 00:33:54 +01:00