Commit graph

28 commits

Author SHA1 Message Date
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
Tom Hughes
314b734aa5 Introduce some caching for diary views. 2010-01-09 16:43:38 +00:00
Tom Hughes
e23744bd8d Add :warning and :error flash messages which can be styled separately to
the existing :notice messages.

Also reviewd all existing flash messages and changed them to be errors or
warnings when appropriate and checked that those which are not followed by
a redirect are done as flash.now[] instead of flash[].
2009-11-01 13:07:46 +00:00
Tom Hughes
2541ad0f09 We don't need the @notice hack - we can use flash.now to achieve the same thing. 2009-11-01 12:32:31 +00:00
Tom Hughes
0189bce496 Test that the user has cookies enabled at critical points where we
are about to require them and warn the user if they are not enabled.
2009-10-09 08:47:47 +00:00
Matt Amos
77851bac7b Added better messages and error handling in a couple of places. Added integration checks to ensure that the blocking is actually working. Tests FTW. 2009-09-30 17:39:42 +00:00
Matt Amos
daa2496024 First version of blocking feature. Allows both time-based (for map protection) and notice-based (for education) blocks on users. Also introduces user roles and a simple UI for displaying and administering these. 2009-09-28 16:01:00 +00:00
Tom Hughes
d227589a63 Merge oauth branch at r17138 to trunk. 2009-08-18 20:01:56 +00:00
Tom Hughes
cd8bb0dc57 Log unexpected exceptions raised by API calls. 2009-08-15 11:35:43 +00:00
Matt Amos
0d5be22cb5 Merging 16820:16891 from trunk. 2009-08-06 16:24:39 +00:00
Tom Hughes
e48e4ccbd3 Send an appropriate Vary header when we negotiate the language to stop
caches doing the wrong thing. Closes #1995.
2009-08-05 20:35:28 +00:00
Matt Amos
d75bc6ef69 Use method rather than direct access to member for the current token. 2009-08-04 12:59:02 +00:00
Tom Hughes
25d0017b18 Fix compatible_language_from in the http_accept_language plugin to
correctly follow the RFC 2616 language selection algorithm and then
revert to the previous way of selecting languages.
2009-07-15 23:42:56 +00:00
Tom Hughes
1368f194da Try preferred_language_from as it looks for an exact match - only if that
fails do we fall back to compatible_language_from which will take any
language where the first token matches. Fixes #2069.
2009-07-15 23:29:07 +00:00
Tom Hughes
f4571eeb7c Revert r16046.
DO NOT COMMIT MAJOR ENHANCEMENTS TO TRUNK WITHOUT TALKING TO ME FIRST.
2009-06-23 02:48:38 +00:00
Matt Amos
b8f6dbd403 Adding initial version of the OAuth token authentication method. This adds basic OAuth support for registering apps, getting and revoking keys, etc... The tokens come with 6 separate permissions bits; read/write user preferences, write diaries, write API and read/write GPS traces. Needs more tests. 2009-06-22 16:54:37 +00:00
Tom Hughes
1db05339d3 Don't set the Status header - it is set automatically by the FastCGI code
and this manually set one conflicts with that and causes a 200 response
in rails 2.3.2 it seems.
2009-06-04 22:53:05 +00:00
Tom Hughes
2f3e23f6eb Move to version 2.3.2 of rails. 2009-06-04 08:08:24 +00:00
Renamed from app/controllers/application.rb (Browse further)