aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
Commit message (Collapse)AuthorAgeLines
* Merge branch 'release/0.6.3' into developLouise Crow2012-08-22-24/+54
|\ | | | | | | | | | | | | | | Conflicts: app/controllers/admin_public_body_controller.rb app/views/admin_public_body/import_csv.rhtml spec/controllers/admin_public_body_controller_spec.rb spec/models/info_request_spec.rb
| * Validate presence of text to replace in censor rules.Louise Crow2012-08-14-0/+1
| |
| * Add basic validation for regexp censor rules that a valid regexp can be ↵Louise Crow2012-08-14-2/+15
| | | | | | | | created with the text of the rule.
| * Make global validation work correctly for regex censor rules.Louise Crow2012-08-14-1/+1
| |
| * Apply global and public body censor rules to binary files.Louise Crow2012-08-14-9/+10
| |
| * Handle regexp rules when running censor rules on binary files.Louise Crow2012-08-14-5/+2
| |
| * Add association between public bodies and censor rules, have info_request ↵Louise Crow2012-08-14-1/+2
| | | | | | | | apply rules from its public body.
| * Add concept of global censor rules as orthogonal to regex censor rules. ↵Louise Crow2012-08-14-20/+35
| | | | | | | | Apply global rules to every request, not regex rules.
| * Set api_key in before_save rather than after_initialize (to avoid errors ↵Seb Bacon2012-07-19-2/+4
| | | | | | | | when uploading via CSV)
* | Don't send comment alerts for external requests.Louise Crow2012-08-22-3/+4
| |
* | Email admins about external requests tooRobin Houston2012-08-21-2/+5
| | | | | | | | | | | | | | If someone reports an external request as needing administrator attention, we should email the administrators about it. Thanks for spotting this, @crowbot.
* | Fail with NotFound if request slug doesn't existRobin Houston2012-08-20-2/+4
| | | | | | | | Closes #554.
* | Do not send email for external requestsRobin Houston2012-08-20-2/+2
| |
* | Fix testsRobin Houston2012-08-20-1/+1
| | | | | | | | | | | | | | | | | | Also make the InfoRequest#is_old_unclassified? method a little more conservative, by returning false only is the is_external? method returns true. This makes it subtly inconsistent with InfoRequest.find_old_unclassified, but it is better I think to be subtly inconsistent than to risk breaking things that used to work.
* | External requests ought not to be considered old_unclassifiedRobin Houston2012-08-20-1/+2
| | | | | | | | | | We certainly do not want to send reminder emails for such requests, for example, since we do not know the email address to send them to.
* | External requests need not have exim log linesRobin Houston2012-08-20-1/+1
| | | | | | | | We do not send messages for external requests. See #548.
* | Merge branch 'wdtk' into developLouise Crow2012-08-16-8/+14
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: app/controllers/admin_request_controller.rb config/httpd.conf spec/models/info_request_spec.rb
| * | Add method all_can_view? which can be used to determine whether it is ok to ↵Louise Crow2012-08-16-8/+14
| | | | | | | | | | | | cache the associated objects for an info request in the file cache which will be served up without authentication.
| * | Time out pdftohtml after 30 secondsRobin Houston2012-07-20-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | We have a PDF document that appears to send pdftohtml into a loop where it creates millions of tiny PDF files and consumes ever-increasing amounts of memory. (This document: http://www.whatdotheyknow.com/request/119267/response/296719/attach/5/Document%203.pdf)
* | | Time out pdftohtml after 30 secondsRobin Houston2012-08-01-8/+15
| |/ |/| | | | | | | | | | | | | We have a PDF document that appears to send pdftohtml into a loop where it creates millions of tiny PDF files and consumes ever-increasing amounts of memory. (This document: http://www.whatdotheyknow.com/request/119267/response/296719/attach/5/Document%203.pdf)
* | Fix bug that only occurs when loading sample data - sometimes an InfoRequest ↵Seb Bacon2012-07-13-1/+1
| | | | | | | | doesn't have a PublicBody at the time its slug is being calculated.
* | Support regular expressions in CensorRules; also support 'global' ↵Seb Bacon2012-07-13-25/+10
|/ | | | CensorRules that aren't attached to a User or Request or Public Body (but don't expose this in the admin UI). Fixes #33
* WIP new requests feedRobin Houston2012-07-04-10/+3
|
* Use 33 bytes consistentlyRobin Houston2012-07-02-1/+1
| | | | | Let’s use 33 bytes consistently for the API key, to avoid an = pad at the end when it’s base64-encoded.
* Merge branch 'develop' of github.com:sebbacon/alaveteli into developRobin Houston2012-06-23-10/+16
|\ | | | | | | | | | | | | | | Conflicts: Gemfile.lock script/handle-mail-replies script/handle-mail-replies.rb spec/controllers/request_controller_spec.rb
| * Merge branch 'master' into developSeb Bacon2012-06-20-10/+16
| |\
| | * Only invalidate a user's cached requests when their *name* changes. ↵Seb Bacon2012-06-20-2/+3
| | | | | | | | | | | | Otherwise we issue PURGEs every time, for example, we send out email alerts.
| | * Correctly name the person who has requested something for admin attentionSeb Bacon2012-06-19-3/+4
| | |
| | * another typoSeb Bacon2012-06-15-1/+1
| | |
| | * typo in user-facing stringSeb Bacon2012-06-15-1/+1
| | |
| | * Return column name when iterating over admin fields.Seb Bacon2012-06-12-1/+1
| | |
| | * Make emails requesting admin attention appear to come from the user who ↵Seb Bacon2012-06-12-4/+8
| | | | | | | | | | | | requested the attention, not the user who made the original request.
* | | Merge branch 'feature/public-body-api' into developRobin Houston2012-06-20-15/+80
|\ \ \ | |/ / |/| |
| * | API controller tests all passRobin Houston2012-06-18-0/+4
| | |
| * | WIP APIRobin Houston2012-06-07-2/+13
| | |
| * | Don’t try to send alerts to external usersRobin Houston2012-06-06-1/+6
| | |
| * | Non-logged-in users can create requestsRobin Houston2012-06-06-3/+3
| | | | | | | | | | | | | | | Make the info_request validation a bit more forgiving, so that non- logged-in users may create requests.
| * | Fix indexing of info_request_eventsRobin Houston2012-06-06-1/+14
| | | | | | | | | | | | | | | Even external requests need to be indexed, for which we need a slug representing the user.
| * | Initialise API key in the modelRobin Houston2012-06-06-2/+6
| | |
| * | API: we can add a response to a requestRobin Houston2012-06-06-1/+9
| | |
| * | Fail less bafflinglyRobin Houston2012-06-06-1/+9
| | | | | | | | | | | | | | | | | | Fail in a less baffling way if the raw email is associated with an incoming message or an info request that has not yet been saved to the database.
| * | Remove obsolete commentRobin Houston2012-06-06-5/+0
| | | | | | | | | | | | That comment makes precisely no sense whatever, any more.
| * | External requestsRobin Houston2012-06-06-1/+17
| | | | | | | | | | | | | | | Add data model support for “external” requests, i.e. requests added via the API rather than made using the site.
| * | Generate an API key for each public bodyRobin Houston2012-06-06-1/+2
| |/
* / Remove empty unused methodRobin Houston2012-06-07-3/+0
|/
* Log an event when a request is hiddenRobin Houston2012-06-04-0/+1
|
* Copy the admin team on messages sent to usersRobin Houston2012-06-03-0/+1
| | | | | When a user is notified of a request having been hidden, BCC the site admin team.
* File.dirname(__FILE__) is not necessarily absoluteRobin Houston2012-06-03-1/+1
| | | | | | | It’s weird that there’s so much code here that implicitly assumes File.dirname(__FILE__) is an absolute path, because really in general it very much is not! This assumption was invalidated by the recent bundler-awareness changes.
* Remove redundant condition (when deciding who gets email alerts)Seb Bacon2012-05-30-1/+1
|
* Support "following" functionality:Seb Bacon2012-05-30-35/+35
| | | | | | * Change "email me about stuff" wording to "follow" throughout * Introduce a new flag that the user can set, which controls if they get email alerts * Add a new link to a "wall" for logged in users where they can see a feed of all the things they're following