Commit graph

219 commits

Author SHA1 Message Date
Simon Poole
58c61c7962 Actually use user_block 2017-02-18 16:17:46 +01:00
Simon Poole
823f6b4d36 Add functionality to return a specific message for zero hour blocks 2017-02-18 13:53:21 +01:00
Tom Hughes
9fb382eaa9 Initialise locale before looking up user blocked error 2017-02-17 19:59:06 +00:00
Tom Hughes
777b19c775 Make export action send TOTP cookie 2017-01-02 22:51:18 +00:00
Tom Hughes
c8f26592a7 Fix rubocop warnings 2016-12-02 22:01:40 +00:00
Tom Hughes
ec6e096274 Remove redundant creation of an exception object 2016-12-02 09:38:18 +00:00
Matt Amos
8b03371e10 Make API and web roll back any open transactions on timeout
By default the exception thrown by Timeout::timeout is caught
using Kernel::catch so that it cannot be stopped by intermediate
exception handlers. The problem with that is that it stops any
database transactions that were in progress being rolled back
because they never see the exception.

Fortunately passing a class to Timeout::timeout changes it's
behaviour so that the exception is thrown and caught in the normal
way, allowing the database transactions to rollback.
2016-12-02 09:31:45 +00:00
Tom Hughes
e17b89e89f Fix rubocop warnings 2016-10-20 22:35:51 +01:00
Tom Hughes
5d3ecffa28 Fix new rubocop warnings 2016-02-05 13:35:26 +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
Bryan Housel
bd4de52c98 Support using iD on Internet Explorer 11 and above 2015-12-10 18:34:33 -08:00
Tom Hughes
c9d35839be Fix new rubocopy warnings 2015-08-18 20:57:14 +01:00
Tom Hughes
21d60e359a Tests! 2015-03-04 21:49:43 +00:00
Tom Hughes
dbe165bbb3 Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
Tom Hughes
a6b84a0294 Fix more rubocop style issues 2015-02-24 23:12:02 +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
4e6fe811a0 Don't render the offline page for XHR requests 2014-12-14 00:32:50 +00:00
Tom Hughes
96e1665c01 Update to rails 4.1.6 2014-10-02 19:54:21 +01:00
Tom Hughes
49a4efcfa0 Don't offer iD on IE11 2013-11-30 17:53:42 +00:00
John Firebaugh
6b236ec95b Fix feed link for pushState loaded history page 2013-11-25 15:47:42 -08:00
John Firebaugh
44629832dd Merge branch 'master' into redesign
Conflicts:
	vendor/assets/leaflet/leaflet.hash.js
	vendor/assets/leaflet/leaflet.js
2013-11-19 09:42:47 -08:00
Tom Hughes
41e45bad51 Remove the _osm_username cookie and session validation logic
This was a temporary hack to workaround issues with sessions getting
mixed up at the time of the rails 3.1 upgrade, but logs indicate that
whatever the original problem was it is no longer occurring.
2013-11-17 21:52:39 +00:00
John Firebaugh
a5b784bdf7 Replace Vary header with explicit xhr=1 param
IE10 doesn't respect the Vary header.
2013-11-08 17:11:54 -08:00
John Firebaugh
261862a8dd Send appropriate Vary header
Fixes an issue where the XHR response was sometimes
displayed when navigating back to a pushState
based history entry rather than the full page.
2013-11-06 13:16:48 -08:00
John Firebaugh
a56d1036d5 pushState based navigation between map-based layouts 2013-10-13 14:46:08 -07:00
Tom Hughes
0e9e6e6f8f Upgrade to http_accept_language 2.x 2013-09-24 20:22:44 +01:00
John Firebaugh
8dc16bd8db Make iD default editor
Make iD the default editor for all users that have not specified
a preferred editor, except fall back to P2 on IE.
2013-08-15 16:36:18 -07:00
Tom Hughes
b2c42d5521 Fix detection of timeouts 2013-08-12 17:33:18 +01:00
Tom Hughes
3880ac5de8 Replace :nothing => true with :text => ""
Using `:nothing => true` confusingly actually causes a single space
to be sent as the content by rails.
2013-07-19 11:14:55 +01:00
Tom Hughes
2dc7c505fd Remove remaining action cache usage and related infrastructure 2013-06-25 17:47:54 +01:00
Tom Hughes
720c8d0e35 Improve locale selection for Potlatch 2 and iD 2013-05-08 22:28:41 +01:00
Tom Hughes
b0a84cf1bf Explicitly set text/plain as the type for error responses 2013-04-24 17:46:45 +01:00
Tom Hughes
7f598ab412 Merge branch 'master' into notes
Conflicts:
	Gemfile.lock
	app/views/diary_entry/list.html.erb
2013-04-08 22:34:37 +01:00
Matt Amos
3822e8de77 Added database, API and GPX status to capabilities. 2013-04-02 15:05:20 +01:00
Tom Hughes
97e0d5ad1f Add a new write_notes permission needed for OAuth access to notes 2013-03-28 18:50:18 +00:00
Tom Hughes
e8d32637c1 Add javascript OAuth support 2013-03-28 00:34:09 +00:00
Tom Hughes
c2c2535b73 Make sure we always read the body of a PUT or POST request
Unfortunately if a PUT or POST request that has a body fails to
read it then Apache will sometimes fail to return the response it
is given to the client properly, instead erroring:

  https://issues.apache.org/bugzilla/show_bug.cgi?id=44782

To work round this we call rewind on the body for every request using
a filter, which forces it to be fetched from Apache into a file.
2012-11-01 12:45:37 +00:00
Tom Hughes
3ef02b86f0 Revert "Add a newline to the end of the body when reporting an error"
This reverts commit 59c97f4866.
2012-11-01 12:42:47 +00:00
Tom Hughes
59c97f4866 Add a newline to the end of the body when reporting an error
There seems to be some sort problem with ruby 1.9 where a response
body that is a single line with no newline causes the response not
to be sent properly.
2012-11-01 09:13:43 +00:00
Tom Hughes
95fa893163 Make it easier to test alternative locales
Allow a locale=xx parameter in the URL to select the locale.
2012-10-26 21:41:03 +01:00
Tom Hughes
fbabed694b Improve blocks on/by links on user pages
All block related links are now only shown if the user has given
or received any blocks, and include a count of active blocks.
2012-08-10 08:27:37 +01:00
Tom Hughes
6bafc93435 Error in a changeset feed is requested for a non-existent user 2012-05-01 20:40:59 +01:00
Matt Amos
1f9301e2e2 Better comments in application controller logic 2012-04-05 13:52:07 +01:00
Matt Amos
851de28303 Added redactions resource 2012-04-05 13:50:15 +01:00
Matt Amos
67182f824e Fixing review comments
Added scoping for unredacted items, cleaned up authorization and
railsified old_node_controller.
2012-04-05 13:46:40 +01:00