Commit graph

225 commits

Author SHA1 Message Date
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
Tom Hughes
151626d019 We no longer need to disable sessions when the database is offline 2012-04-02 18:42:14 +01:00
Tom Hughes
311f7ddd6e Factor out common code for looking up users 2012-03-21 22:22:33 +00:00
Tom Hughes
a9824dbc2e Use one "no_such_user" view everywhere 2012-03-21 21:47:09 +00:00
Tom Hughes
e1d873cde9 Add functional tests for user blocks
Also fixes various issues in the code discovered while writing
the tests, and adds some named routes for user blocks.
2012-03-19 11:26:02 +00:00
Tom Hughes
232e04ab9b Use a consistent host name in cache keys 2012-03-04 10:27:34 +00:00
Tom Hughes
af13c42322 Refactor session persistence code 2012-02-26 21:44:17 +00:00
Tom Hughes
e2b185133e ActionController::UnknownAction is now AbstractController::ActionNotFound 2012-02-15 17:48:16 +00:00
Tom Hughes
8afc736536 Revert "Log locale selection"
This reverts commit 101ee6ade2.
2012-02-14 15:47:21 +00:00
Tom Hughes
101ee6ade2 Log locale selection 2012-02-14 14:57:29 +00:00
Tom Hughes
63cc3c195a Try really hard to find out if the real exception was a timeout
Helpfully rails manages to wrap the actual exception that occurred
in at least one, and sometimes two further levels of exception, one
of which does preserve the original exception except as text.
2012-01-07 15:03:25 +00:00
Tom Hughes
55dda7b184 Recognise wrapped timeout exceptions properly 2012-01-07 14:16:39 +00:00
Tom Hughes
00a605a2a8 Use Timeout if SystemTimer isn't loaded 2012-01-06 09:11:23 +00:00
Tom Hughes
7e66fcbb1b Log any session that is reset due to a username mismatch 2011-11-24 09:42:04 +00:00
Tom Hughes
7b89dc6349 Make OAuth work again 2011-11-16 21:13:25 +00:00
Tom Hughes
cbd687d0b1 Explicitly select the default locale if we have no better ideas 2011-11-16 09:21:23 +00:00
Tom Hughes
4408416b62 Add some logging to help diagnose changeset feed locale issue 2011-11-16 08:56:35 +00:00
Tom Hughes
9e2132b83d Don't reset the session when the token refers to an invalid user
During account creation it is quite normal for the token in the
session to refer to a user that is not active yet.
2011-11-14 09:42:59 +00:00
Tom Hughes
5bc3054d61 Store the username in a cookie and use it to validate the session 2011-11-14 09:42:59 +00:00
Tom Hughes
c485ae3249 Fix object_id warning 2011-11-14 09:42:58 +00:00
Tom Hughes
2c837d896d Make database offline mode work 2011-11-14 09:42:56 +00:00
Tom Hughes
96c22b169a Get OAuth working, including a hack for Potlatch 2011-11-14 09:42:55 +00:00
Tom Hughes
f0d7c4a8d6 Rework expansion of HTTP status code to work with rails 3 2011-11-14 09:42:48 +00:00
Tom Hughes
7f556f94f1 Temporary fix for postgres enums pending rails 3.0.4 2011-11-14 09:42:46 +00:00
Tom Hughes
1e13e6ae2d Update oauth support for rails 3 version of oauth plugin 2011-11-14 09:42:45 +00:00
Tom Hughes
226c41be69 Update ActiveRecord queries to use arel 2011-11-14 09:42:44 +00:00
Tom Hughes
7d45c2fd3c Replace request.request_uri with request.fullpath 2011-11-14 09:42:42 +00:00
Tom Hughes
c9fa49c994 Update to rails 3 2011-11-14 09:42:40 +00:00
Tom Hughes
59a49a6ef5 Fix problems with database offline mode 2011-06-23 08:30:44 +01:00
Tom Hughes
540e56a9cc Add an option to require the CTs to be agreed to edit 2011-06-14 22:57:05 +01:00
Tom Hughes
c4f7a8346a Use session.delete to remove entries instead of assigning nil 2011-06-01 10:17:54 +01:00
Tom Hughes
d681d7e07f Force a session to be created when doing a cookie test 2011-06-01 10:16:11 +01:00
Tom Hughes
02e186ee5b Allow user details to be fetched without agreeing terms 2011-04-20 21:17:59 +01:00
Matt Amos
c21aa5933a Added flash notice for CTs decline
Also ensured that CTs are either accepted or declined and cannot
be inadvertently bypassed.
2011-04-18 00:29:15 +01:00
Tom Hughes
2ba5067fcf Use report_error so Potlatch can see the errors 2011-04-17 21:45:04 +01:00
Tom Hughes
8024a38be4 Make sure "please read the terms" error is issued in the right language 2011-04-17 20:33:49 +01:00
Tom Hughes
685a35524a Try and patch up poor browser language selections
The HTTP RFC says that a language range specified by a browser only
matches a resource whose language tag is the same, or longer. This
means that a browser language range of de-DE will not match a resource
with a language tag of de.

Because of this browsers should always send the generic range, such
as de, as a secondary choice after a more specific range like de-DE.

Some browers don't this however, so if we don't get a language match
we try and patch up the list of language ranges by inserting the
more generic ranges.
2011-04-04 22:44:43 +01:00
Tom Hughes
392aa71015 Tidy up a few things 2011-04-03 13:46:16 +01:00
Matt Amos
8b12abd5bb Phase 2 CTs implementation and tests, with config parameter 2011-04-03 13:46:16 +01:00
Tom Hughes
f20a85a5c5 Allow the client to request errors as an XML document 2010-12-15 23:58:59 +00:00
Tom Hughes
3472c1d429 Channel all error reporting through report_error 2010-12-12 16:25:01 +00:00
Tom Hughes
f07819d81a Rework application configuration
Use a preinitializer to load the settings from application.yml so
that they are available as early as possible. All settings can also
be overridden using environment variables.

The ad-hoc settins in environment.rb are then moved to this new
system so we have one consistent location for settings.
2010-08-04 22:06:05 +01:00
Tom Hughes
af70363d02 Don't cache actions with a page number 2010-07-22 20:47:35 +01:00
Tom Hughes
0e19a9290d Remove use of wildcard cache expiry
Instead of doing wildcard cache expiry, just iterate over the
available locales, expiring the requested entry in each locale.
2010-07-22 20:47:34 +01:00
Tom Hughes
cd3fc33171 Remove the user type from cache keys 2010-07-22 20:47:34 +01:00