aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
Commit message (Collapse)AuthorAgeLines
* Filter public body tracks by event typeRobin Houston2012-05-04-2/+6
| | | | | 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-5/+4
| | | | | | | | | | | | | | | 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.
* No code changesRobin Houston2012-03-13-3/+5
| | | | Just trailing whitespace & one comment.
* Admin users clicking confirmation linksRobin Houston2012-03-13-1/+8
| | | | Fixes #446. See issue for details.
* Let admin users use auto-login URLsRobin Houston2012-02-06-3/+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/+2
| | | | | Include information about what the per-day limit is, and when the user can next make a request. Fixes #412.
* Return 404 for /feed/user/no_such_userRobin Houston2012-02-03-0/+1
| | | | Fixes #407.
* Make variables localRobin Houston2012-02-03-6/+6
| | | | | | | The variables last_request_id and last_body_id were not used by the view, so it’s clearer to make them local variables so it’s obvious from the controller code which values influence the rendering.
* Merge branch 'wdtk' into release/0.5Robin Houston2012-02-01-6/+27
|\ | | | | | | | | Conflicts: locale/app.pot
| * issue #351 reduxRobin Houston2012-02-01-1/+4
| | | | | | | | Corrected diagnosis, test & fix for issue #351. Fixes #351.
| * Close xapian db before opening it againRobin Houston2012-01-31-1/+4
| | | | | | | | | | | | This *ought* to fix the problem with the alert-tracks daemon opening more and more copies of the xapian db till it exhausts the available file descriptors.
| * Keep message text if user is rate-limitedRobin Houston2012-01-31-4/+19
| | | | | | | | | | | | | | If a user cannot make new requests because they are rate-limited, and they compose a request whilst logged out, include the text of the request in the message that explains about the rate limit so it is not lost.
* | Merge branch 'issue_393' of https://github.com/henare/alaveteli into release/0.5Seb Bacon2012-01-31-3/+3
|\ \ | |/ |/|
| * Fixes #393 - Route the mass_assign_tags action so it does what it says on ↵Henare Degan2012-01-31-1/+1
| | | | | | | | the tin
| * Controller tests were failing for these actions - switching to more concise ↵Henare Degan2012-01-31-2/+2
| | | | | | | | URL helpers seemed to fix things up
* | Make better wording at the top of the page listing subsets of public bodies. ↵Seb Bacon2012-01-30-4/+8
|/ | | | At the same time, cause the tests not to rely on WDTK data. Fixes #396
* Rate limitingRobin Houston2012-01-29-2/+7
| | | | | | 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.
* Change order of requests on front pageRobin Houston2012-01-29-5/+6
| | | | | | | Put the most-recently-answered first, rather than the most-recently-reclassified. This is inspired by issue #370, though it does not fix all the issues raised in that ticket. (The wording is still outright misleading in some cases.)
* Irrelevant changeRobin Houston2012-01-29-3/+1
| | | | | So, well, I found this change when I ran git diff; and the truth is that I just prefer it aesthetically. Is that so sinful?
* More test data and a new testRobin Houston2012-01-27-4/+3
| | | | | This is a test for what I thought issue #370 might be. However this test is passing, so it isn’t that.
* No tabs for indentationRobin Houston2012-01-26-1/+1
|
* Fix #372Robin Houston2012-01-26-1/+1
|
* Remove trailing spacesRobin Houston2012-01-26-1/+1
|
* Simplify search logic so it doesn't depend on sessions. Also fixes #338Seb Bacon2012-01-25-29/+7
|
* Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkSeb Bacon2012-01-25-9/+3
|\ | | | | | | | | Conflicts: app/controllers/request_controller.rb
| * Remove misleading copy-pasted commentRobin Houston2012-01-24-9/+1
| |
| * Logging for fragment cacheRobin Houston2012-01-21-0/+2
| |
| * bug fixRobin Houston2012-01-20-1/+1
| |
* | Return a 404 for missing user profile pictures. Fixes #363Seb Bacon2012-01-24-1/+2
| |
* | Ensure short cache keys for interlock. Fixes #362Seb Bacon2012-01-24-1/+2
| |
* | Bug: we are causing a 500 when trying to raise 404 because the arguments to ↵Seb Bacon2012-01-24-1/+2
|/ | | | the exception constructor are wrong.
* Don't allow users to page beyond a certain number of results (because in ↵Seb Bacon2012-01-20-5/+8
| | | | large databases, the sorting of such large batches causes an extreme slowdown).
* Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkRobin Houston2012-01-19-1/+1
|\
| * Don't obscure user searches on request listing page behind cache. Fixes #256Robin Houston2012-01-19-1/+1
| |
* | Record URL and PID *before* a request is processedRobin Houston2012-01-19-0/+1
|/ | | | | | | (If DEBUG_RECORD_MEMORY is enabled) This is useful for tracking down bugs that cause Rails to go into an infinite or very long loop, as the recent Xapian wildcard bug does.
* Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkSeb Bacon2012-01-19-15/+39
|\
| * Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkRobin Houston2012-01-19-9/+26
| |\
| | * Merge branch 'release/0.5' into wdtkRobin Houston2012-01-19-4/+8
| | |\ | | | | | | | | | | | | | | | | Conflicts: app/views/public_body/_search_ahead.rhtml
| | | * Return a 404 for broken attachment urls. Fixes #351.Seb Bacon2012-01-18-1/+2
| | | |
| | | * Catch timeouts and other extra errors when connection to 3rd party websites ↵Seb Bacon2012-01-18-1/+1
| | | | | | | | | | | | | | | | fails.
| | | * Fix paging bug for type ahead search. This wasn't caught because the spec ↵Seb Bacon2012-01-18-2/+5
| | | | | | | | | | | | | | | | didn't call "integrate_views", so the rendering part was mocked by RSpec instead of executed.
| | * | Merge branch 'wdtk' of https://github.com/sebbacon/alaveteli into wdtkRobin Houston2012-01-19-0/+7
| | |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: app/controllers/application_controller.rb
| | * | | Limit Xapian wildcard expansionsRobin Houston2012-01-19-5/+18
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wildcard searches in Xapian can expand uncontrollably, consuming all available RAM and crashing the server. This has been a real problem on WhatDoTheyKnow.com. The underlying issue is tracked in http://trac.xapian.org/ticket/350 This changeset imposes a limit on wildcard expansion. The type-ahead search will first try a wildcard query, and if that fails because of too much expansion will fall back to a plain non-wildcard search.
| * | | Whitespace cleanupRobin Houston2012-01-19-6/+6
| | |/ | |/|
| * | Forbid very slow-to-load results pagesRobin Houston2012-01-19-0/+7
| | | | | | | | | | | | Another temporary patch to protect the live site.
| * | Disable Xapian wildcardsRobin Houston2012-01-19-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | Do not use FLAG_WILDCARD or FLAG_PARTIAL anywhere, because wildcard searches can crash the whole server as per http://trac.xapian.org/ticket/350 (e.g. http://www.whatdotheyknow.com/body/search_ahead?query=app will crash the server prior to this commit.) This is a temporary fix while we investigate the possibilities of the set_max_wildcard_expansion() method, which should make it possible to alleviate this issue.
* | Show some info about the Alaveteli version currently running. Fixes #319.Seb Bacon2012-01-19-0/+4
| |
* | Don't choke on very long filenames when caching attachments. Fixes #349.Seb Bacon2012-01-19-1/+4
|/
* Don't allow directory listings (better fix for and closes #340).Seb Bacon2012-01-17-10/+7
|
* Actually do a proper ORed and partial match query, rather than fix parsing ↵Seb Bacon2012-01-17-10/+18
| | | | errors ad hoc as I find them that result from the workaround code. Fixes #328 (for good, I hope).