Commit graph

684 commits

Author SHA1 Message Date
Tom Hughes
282ff4936c Fix rubocop warnings 2016-10-31 21:24:10 +00:00
Tom Hughes
20aa4ba31b Merge remote-tracking branch 'openstreetmap/pull/1336' 2016-10-26 15:35:18 +01:00
Andy Allan
f464e2a6e9 Suppress XML parsing errors.
This technique was already used in app/models/changeset.rb

This suppresses the error messages when parsing invalid XML, but
the exceptions are still raised, as tested in test_from_xml_double_lat
in test/models/node_test.rb
2016-10-26 10:35:03 +01:00
Andy Allan
162f04d789 Convert ACL fixture to a factory, and add some tests
The fixture was unused, so I took the opportunity to put in a couple
of basic model tests.
2016-10-26 09:15:56 +01:00
Tom Hughes
e17b89e89f Fix rubocop warnings 2016-10-20 22:35:51 +01:00
Mikel Maron
a32076abd6 fix rubocop warnings 2016-10-07 06:32:05 -04:00
Mikel Maron
3c01d2e80d more idiomatic models for diary entry subscriptions 2016-10-06 20:31:10 -04:00
Mikel Maron
44b08cc35d not api endpoints, moved to button, fixed notifier message, fixed tests 2016-10-03 22:20:04 -04:00
Mikel Maron
443080d7b0 WIP diary comment subscriptions 2016-10-03 15:04:22 -04:00
Tom Hughes
5f4dcd34ff Fix some rubocop warnings 2016-09-15 22:41:07 +01:00
Tom Hughes
d82f9d12ce Fix new rubocop warnings 2016-09-15 19:21:00 +01:00
Tom Hughes
13c2ac5cdb Reorder auth_success handlers
Only treat auth_success as a possible login attempt if we're not
in the middle of validating a new user, or a change to a user.

Also validate the uniqueness of external auth credentials at the
rails level rather than just at the database level, and make sure
any errors are properly reported.

Fixes #1265
2016-08-14 18:30:13 +01:00
Tom Hughes
5d3ecffa28 Fix new rubocop warnings 2016-02-05 13:35:26 +00:00
Tom Hughes
77c25dca8c Validate characters in changeset comments
Fixes #1135
Closes #1139
2016-01-19 09:51:24 +00:00
Tom Hughes
8fe1899596 Fix rubocop warnings 2016-01-19 09:51:24 +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
c9d35839be Fix new rubocopy warnings 2015-08-18 20:57:14 +01:00
Tom Hughes
098d1fc235 Allow customer URL schemas for OAuth callback URLs
Fixes #1019
2015-07-28 12:13:18 +01:00
Tom Hughes
a22c3525e4 Add HTML version of friend notification email
Fixes #995
2015-06-25 00:16:15 +01:00
Matt Amos
cf6a5c17ee Fix bug allowing created elements to reference deleted ones
The bug allows a newly-created element to refer to a deleted one
if the transactions for both overlap. Precisely, the issue is that
the check that an element exists does not prevent a concurrent
transaction from altering that row.

Because "deleting" an element in the OSM database does not remove
the row, we cannot rely on FK constraints to ensure the correct
behaviour. Instead, this fix relies on manually locking referenced
elements.

Note that this "fix" is suboptimal, as it does not allow any
updates to the referenced elements. Updates which do not delete
the row could safely be done, but will be prevented.

Also, it's not clear what the negative performance impact of this
change will be.
2015-06-13 10:59:57 +01:00
Tom Hughes
2af0840ff3 Fix style issues found by new rubocop version 2015-04-14 09:38:24 +01:00
Tom Hughes
650adc10b2 Allow space as a language separator
The separator is supposed to be comma, so technically having
space instead is user error, but it seems to be very common.

Fixes #942
2015-03-31 20:53:51 +01:00
Tom Hughes
c0e4394a48 Add extra tests for API and redaction controllers 2015-03-03 00:55:19 +00:00
Tom Hughes
dfc85f089a Test changeset and note comment notification emails 2015-03-02 00:43:07 +00:00
Tom Hughes
fd588cd715 The test train rolls ever onwards... 2015-03-01 17:04:39 +00:00
Tom Hughes
857f0f460b More work on test coverage 2015-02-28 00:45:56 +00:00
Tom Hughes
cd3db7df4d Fix validation failures for trace tags
Fixes #914
2015-02-27 10:04:40 +00:00
Tom Hughes
f04211b172 Improve test coverage 2015-02-27 00:40:37 +00:00
Tom Hughes
dbe165bbb3 Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
Tom Hughes
e434cb154c Convert OpenID authentication to generic third party authentication 2015-02-25 01:07:23 +00:00
Tom Hughes
a6b84a0294 Fix more rubocop style issues 2015-02-24 23:12:02 +00:00
Tom Hughes
8e404f3a46 Fix some more rubocop style issues 2015-02-20 20:39:52 +00:00
Tom Hughes
dc2a2c8ebd Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
Tom Hughes
5cbd4038ed Fix rubocop style issues 2015-02-20 08:56:16 +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
34e3e51456 Cleanup trailing whitespace 2015-02-20 08:56:16 +00:00
Tom Hughes
6e56580278 Remove some (hopefully) redundant code 2015-01-11 12:54:17 +00:00
Tom Hughes
8fa9763281 Set default formats in the database now that rails handles enums
Because rails now reads the defaults from the database correctly it
no longer works to set them conditionally in after_initialise as they
have already been set.
2015-01-11 12:54:16 +00:00
Tom Hughes
4d44f188e1 Include number of recent diary entries in spam scoring 2014-11-20 21:18:00 +00:00
Tom Hughes
8598db3233 Tidy up changeset comment code 2014-10-23 21:24:51 +01:00
Łukasz Gurdek
14ac1babc2 Changeset discussions
Add support for commenting on changesets with RSS feeds and email
notification of comments to other commenters and people that have
chosen to subscribe to a changeset.
2014-10-23 21:24:51 +01:00
Tom Hughes
8983fb3600 Validate note comments for control characters 2014-10-16 00:59:34 +01:00
Tom Hughes
c83778df8c Ban usernames which match special URLs
Trac #5236
2014-10-02 13:37:26 +01:00
Tom Hughes
c72940684e Fix error resolving relation parents
It's not entirely clear why specifying the foreign key explicitly
fixes this - the value given is what it should default to - but
without this it finds the child relation instead when looking at
the parents of a relation.

Fixes #789
2014-07-24 00:23:45 +01:00
Tom Hughes
28bfb9999f Rename Trace#public to Trace#visible_to_all 2014-07-04 19:24:25 +01:00
Tom Hughes
56d39b06f2 Rename User#public to User#identifiable 2014-07-04 19:24:25 +01:00
Tom Hughes
0cc579b287 Improve blocking of characters not allowed in XML 2014-06-19 00:25:18 +01:00
Tom Hughes
32c385e8d7 Probit control characters in user names 2014-06-15 16:33:26 +01:00
Tom Hughes
098c2675ba Add support for ACL blocks on note commenting 2014-06-03 20:59:25 +01:00