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
Tom Hughes
cf682f49b3
Add a timeout to the change list pages
2010-05-21 20:21:41 +01:00
Tom Hughes
9230721a1f
Redirect suspended users to an information page
...
If the current session is for a logged in user and that user has
been suspended then log them out and redirect them to a page
explaining that their account has been suspended.
2010-05-07 10:00:24 +01:00
Tom Hughes
5a54630b57
Add support for suspended and confirmed users
...
Replace the existing "active" and "visible" with an enumerated status
that allows for extra cases. Currently we have "suspended" for users
who hve triggered the spam detector and "confirmed" for users that have
triggered the detector but have been confirmed as vald by an admin.
2010-05-06 17:18:34 +01:00
Tom Hughes
2df3a8d2e2
Rethrow ActionController::UnknownAction exceptions encountered by
...
the API so that rails handles them in the normal way and shows
the 404 page to the user. Closes #1989 .
2010-02-26 15:27:52 +00:00
Tom Hughes
fa554045e5
Make cache distinguish pages views by admins or moderators from those
...
viewed by normal users.
2010-01-13 21:30:09 +00:00
Tom Hughes
7381dad23b
Generate cache paths in the same way as the normal expire_action routine
...
so that the escaping matches correctly.
2010-01-11 18:24:55 +00:00
Tom Hughes
841ebe80d7
Use system_timer for timeouts to make them more reliable.
2010-01-11 09:28:31 +00:00
Tom Hughes
f5777a881f
Don't cache the trace list for logged in users.
2010-01-11 00:16:21 +00:00