aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
Commit message (Collapse)AuthorAgeLines
* Merge branch 'master' into wdtkRobin Houston2012-05-25-1/+1
|\
| * Ensure we always return a string of some kind when asking for the ↵Seb Bacon2012-05-22-1/+1
| | | | | | | | short_or_long_name of a public body
* | Filter public body tracks by event typeRobin Houston2012-05-04-23/+31
| | | | | | | | | | Add the facility to filter the public body feed by event type using a query string parameter, e.g. event_type=sent.
* | Fix the "log in as" functionRobin Houston2012-03-20-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the "log in as" function after 3b6e5a692b852a88f55b21a7210f60a6f7cfc24b would attempt to log the admin user out before issuing the redirect. Unfortunately this approach does not work on WhatDoTheyKnow, where the admin pages are served via a different domain (secure.mysociety.org) and so do not share session information with the rest of the site. This commit changes it to mark the PostRedirect with circumstance == "login_as", which signals the user controller to log out the previous user even if they are an admin. In other words, the user is logged out on the main site rather than the admin site, skirting this problem. Closes #450.
* | Only trailing whitespaceRobin Houston2012-02-16-1/+1
|/
* Don’t index unconfirmed usersRobin Houston2012-02-06-1/+6
| | | | Closes #415.
* Let admin users use auto-login URLsRobin Houston2012-02-06-0/+6
| | | | | | Don't change logged-in user from an admin when visiting a auto-login URL. Closes #306.
* Change wording of rate-limited pageRobin Houston2012-02-05-0/+10
| | | | | Include information about what the per-day limit is, and when the user can next make a request. Fixes #412.
* Specify attachment orderingRobin Houston2012-02-03-1/+1
| | | | | | | | | | | | | | | So it turns out that issue #408 is a real and potentially nasty bug. The code was assuming that attachments are returned in the order they were created, which is a) not guaranteed to be the case, and b) sometimes actually not the case, hence the occasional test failures. This trivial patch corrects the issue by sorting attachments by id. The effect of this is to return them in the order they were added to the database, since all were added using the same sequence in a single database session. Fixes #408.
* Remove trailing whitespaceRobin Houston2012-02-03-2/+2
|
* Remove trailing whitespaceRobin Houston2012-02-02-1/+1
|
* Merge branch 'wdtk' into release/0.5Robin Houston2012-02-01-1/+1
|\ | | | | | | | | Conflicts: locale/app.pot
| * Change (Banned) to (Account suspended)Robin Houston2012-01-31-1/+1
| | | | | | | | | | | | | | | | When a user account has been suspended, we write (Banned) after their user name. But sometimes we need to suspend accounts temporarily, such as pending the result of a discussion, and it is misleading to write (Banned) in such cases; so let’s change it to (Account suspended) instead.
* | A missing i18n stringSeb Bacon2012-01-31-1/+1
|/
* Rate limitingRobin Houston2012-01-29-3/+19
| | | | | | Add the capability to specify a limit to the number of requests a user can make per day, which can be turned off for specific users in the admin interface.
* Fail fasterRobin Houston2012-01-29-0/+3
| | | | | | Better error reporting when an incoming message has no raw_email. This is useful if you make a mistake when creating new test data, to pick an example application completely at random (not).
* Raise exception if $RAILS_ENV is unsetRobin Houston2012-01-29-1/+5
| | | | | If $RAILS_ENV is unset, raise an exception rather than just blithely creating a directory called cache/attachments_.
* Remove references to removed database columnsRobin Houston2012-01-24-24/+2
| | | | | Remove the references to raw_emails.data_text and data_binary, which have not existed since the summer.
* Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkSeb Bacon2012-01-19-8/+7
|\
| * Don't raise an error if the user deletes a track through the UI. Fixes #353.Seb Bacon2012-01-18-8/+7
| |
* | Use an atomic write when storing email data.Seb Bacon2012-01-19-1/+1
| |
* | Always show the right search snippet. Fixes #352.Seb Bacon2012-01-19-1/+21
|/
* Force the 'C' locale for elinksRobin Houston2012-01-17-2/+2
| | | | | The behaviour of elinks is locale-dependent. This patch forces LANG=C which makes the behaviour consistent across platforms.
* Comment typoRobin Houston2012-01-17-1/+1
|
* Explicitly specify little-endian UCS-2Robin Houston2012-01-17-2/+2
| | | | | because for some reason iconv is assuming big-endian on my MacBook Pro (OS X 10.7.2) unless told explicitly, and this causes test failure.
* Use AlaveteliExternalCommand for unrtfRobin Houston2012-01-17-3/+1
|
* Use AlaveteliExternalCommand for pdf recompressionRobin Houston2012-01-17-7/+3
|
* Replace all `which command` callsRobin Houston2012-01-17-12/+8
| | | | | | | | | | The trouble with `which command` is twofold: - It spawns a whole shell just to find out the path to a binary, every time; - The results are environment-dependent, since they depend on $PATH. It would be better to specify the search path in the configuration file where everything else is specified rather than in the environment. This commit replaces it with the new mechanism from AlaveteliExternalCommand.
* Typo whoopsRobin Houston2012-01-17-1/+1
|
* Call uudecode via AlaveteliExternalCommandRobin Houston2012-01-17-3/+1
| | | | | | So do not rely on a hard-coded path. Also change the order of arguments and use /dev/stdout rather than -, so it works with the Mac/BSD version of uudecode as well as the Linux version.
* Do not hard-code the path to pdftohtmlRobin Houston2012-01-17-3/+1
|
* Merge branch 'fast-search-hack' into wdtk. Addresses the second slow SQL ↵Seb Bacon2012-01-13-4/+18
|\ | | | | | | example at issue #327, at least in part.
| * Changes to make normal search pages not necessarily load info_request_events ↵Seb Bacon2012-01-12-4/+18
| | | | | | | | every time
* | To get around occasional race conditions, instead of forcing an fsync, retry ↵Seb Bacon2012-01-13-1/+15
| | | | | | | | getting the body a few times before failing. May be related to issue #333 and #339
* | Make sure acts_as_xapian is loaded only onceRobin Houston2012-01-12-1/+0
| | | | | | | | | | | | | | | | | | | | | | This silences the warnings: warning: already initialized constant MSET_MAX_TRIES warning: already initialized constant MSET_MAX_DELAY coming from vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb and also resolves an XXXX-marked issue.
* | Merge branch 'release/0.5' of github.com:sebbacon/alaveteli into release/0.5Robin Houston2012-01-12-89/+118
|\|
| * Changes to attempt to ensure we always get a consistent state for an ↵Seb Bacon2012-01-12-14/+17
| | | | | | | | incoming message's attachments. May fix #339.
| * Attempt to fix #333 ('attempt' because hard to test!)Seb Bacon2012-01-11-0/+1
| |
| * Ensure model schema documentation is up to date.Seb Bacon2012-01-09-71/+89
| |
| * Ensure we regenerate cache if for some reason it's missingSeb Bacon2012-01-09-1/+7
| |
| * Merge branch 'release/0.5' of github.com:sebbacon/alaveteli into release/0.5Seb Bacon2012-01-08-1/+1
| |\
| | * Fix user profile validation errors not showing. Fixes #317David Cabo2012-01-06-1/+1
| | |
| * | Don't give error when viewing HTML versions. Fixes issue #321Seb Bacon2012-01-08-2/+2
| |/
| * Return nil if there's no latest calculated state to returnSeb Bacon2012-01-06-0/+1
| |
* | Improve SQL performanceRobin Houston2012-01-12-1/+12
|/ | | | Replace a slow query with a much faster equivalent one.
* Ensure attachments have been parsed before generating cached extractsSeb Bacon2012-01-05-0/+1
|
* Correctly test for auto-submitted headers. Fixes #316.Seb Bacon2012-01-05-2/+2
|
* Display internationalized emails correctly (specifically, RFC2047 headers, ↵Seb Bacon2012-01-04-47/+44
| | | | and HTML emails with encoding in a meta-tag). Fixes #281
* Remove class file that was made redundant in ↵Seb Bacon2012-01-04-269/+0
| | | | 79fd89c5aec01ea035d57c5a71213202dafc778c
* Ensure we always censor safe_mail_from; and mention new only-parse-once ↵Seb Bacon2011-12-21-12/+12
| | | | feature in CHANGES.md