| Commit message (Collapse) | Author | Age | Lines |
... | |
| | |
| | |
| | |
| | | |
By default, give an incoming message a body attachment.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This was disabled for hidden requests as the download was by redirect,
allowing people who have not been authenticated to conceivably access
the download. We'll be moving to send_file instead, so can restore it.
|
| | |
| | |
| | |
| | |
| | | |
The third (and any subsequent) session created shares a session id with
the second without this explicit reset.
|
| | |
| | |
| | |
| | | |
We're testing the code path where there is no converter here.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds a spec for what we want to see - no message text in
correspondence.txt, and no attachments. Refactors the
simple_correspondence templates to make it clearer that these are doing
the same job as the html.erb ones, for text.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Each part is a separate sentence, and we're going to reuse some of them
in the text view.
Conflicts:
spec/integration/view_request_spec.rb
|
| | |
| | |
| | |
| | | |
Also, store an event for the incoming message.
|
| | |
| | |
| | |
| | |
| | | |
Make it an integration spec so we don't need to touch the internals so
much.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Add another spec for the same behaviour when an incoming message is
hidden.
|
| | | |
|
| | |
| | |
| | |
| | | |
Remove expectation of pdf contents - we're looking at the raw file.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
They refer to the case where the request itself is hidden.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Make specs that depend on multiple controllers and models interacting
integration specs.
|
| | |
| | |
| | |
| | | |
Eventually this should use standard RESTful routing.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
app/views/request/_incoming_correspondence.html.erb
Conflicts:
spec/integration/view_request_spec.rb
|
| | | |
|
| | |
| | |
| | |
| | | |
Different messages for normal user, requester and admin user.
|
| | |
| | |
| | |
| | | |
Add a failing test for what should happen on request hiding.
|
| | |
| | |
| | |
| | | |
Move it into the Ability module.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Add a convenience method for getting the 'response' event associated
with an incoming message.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a migration to remove the unused column 'prominence' from
info_request_events, remove validation of prominence, remove unused
InfoRequestEvent.user_can_view? method. Remove references to
InfoRequestEvent.prominence.
|
|\ \ \ |
|
| | | | |
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The spec uses a hook method to simulate the insertion of an
acts_as_xapian_job in another process for the model.
Credit to: http://stackoverflow.com/questions/2017587/simulating-race-conditions-in-rspec-unit-tests
Conflicts:
vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
|
|\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
app/controllers/public_body_controller.rb
config/general.yml-example
lib/configuration.rb
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This introduces some raw SQL statement for the fallback case, but we
can't see an easy way to avoid that in this case.
This commit also adds some tests that assert the sorting and
non-duplication properties of the listing.
Thanks to Louise Crow for working out the SQL expression for
falling back to the default locale.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It's useful to be able to generate example public bodies that only
have translations in particular languages.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
These tests will fail unless we have the new behaviour for public body
listing, which depend on the setting of
PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE.
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As the code stood, the list method in PublicBodyController would only
return results that had translations of the public body in the default
locale. This has a variety of problems if you're viewing pages in the
non-default locale - for example, the "first letter" links wouldn't
bring up the public bodies that began with that letter in the current
locale, only those that began with it in the default locale.
Ideally, every public body would be translated into every available
locale for the site, but there are cases where deployers wish to have
public body listings also include those from the default locale, in
case there are untralsated public bodies:
https://groups.google.com/d/msg/alaveteli-dev/zUY_USaAMAM/M7KTQ9RC5YUJ
This commit makes the default behaviour to look for public body
listings only in the current locale, but if the new configuration
option PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE is set, then public
body listings will be looked for in both the current locale and the
default locale.
Fixes #1000
|
| | | | |
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
Check to see if the stripped version is different before setting it on
the record. If we don't do this, the subsequent call to write_attribute
in Globalize3 which uses attribute_will_change! means we're storing
versions when there hasn't really been any change.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On PublicBody, we don't need to update info_requests_count
because that's already done with :counter_cache. On the
other hand, info_requests_successful_count and
info_requests_not_held_count can't be updated easily with
counter_cache (since they need conditions to be attached).
Instead we update them in post_save and post_destroy,
as suggested here:
http://blog.douglasfshearer.com/post/17495285851/custom-counter-cache-with-conditions
This also adds tests to ensure that the
after_(save|destroy) callbacks are called and that they
modify the counts correctly.
|
| | | |
|