aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
Commit message (Collapse)AuthorAgeLines
...
* | Add ‘trusted’ flag allowing users to make reports directlyDave Arter2016-09-20-0/+1
|/ | | | | When a trusted user makes a report in a category that requires inspection, it'll be sent immediately (i.e. without being inspected first).
* Update contact success message text.Matthew Somerville2016-09-14-2/+2
|
* Require inspector to provide update when instructing reportDave Arter2016-09-12-0/+22
| | | | | | | This adds an update field to the bottom of the inspect form, requiring the inspector to provide an update to be added to the report as it's sent. See mysociety/fixmystreetforcouncils#64
* Add new category_edit restriction for viewing body admin.Matthew Somerville2016-09-09-122/+29
|
* Add manage screen for editing priority/category.Matthew Somerville2016-09-09-0/+97
| | | | | | | This is a cut-down version of the full inspect screen. We truncate the co-ordinates just in case (they should be anyway but e.g. the test report isn't).
* Refactor problem response priority into its own modelDave Arter2016-09-09-0/+73
| | | | | | | This moves the response priority values from a cobrand-specific method to a full DB model, and includes management screens in the admin for administering them. For mysociety/fixmystreetforcouncils#66
* Simplify some permissions logic with extra helper methodDave Arter2016-09-08-1/+1
|
* Extend response templates to work across all cobrandsDave Arter2016-09-08-4/+40
| | | | | | | | | | | This builds on the response templates in the Zürich cobrand: - Allow response templates to be assigned to categories - Also adds a auto_response flag, which will be used to automatically create updates when reports are made. - Include response templates select box on update form For mysociety/fixmystreetforcouncils#31
* Warnfix test by specifying areas for problem.Matthew Somerville2016-08-24-1/+3
|
* Allow user to have an area assigned in adminDave Arter2016-08-22-240/+260
|
* Add user planned reports.Matthew Somerville2016-08-22-6/+61
| | | | | | A user with the appropriate permission can add/remove reports from their list of planned reports using a button on a report page. The list can be viewed at /my/planned.
* Allow user permissions to be granted/revoked in adminDave Arter2016-08-17-45/+324
|
* Restrict user editing in adminDave Arter2016-08-17-0/+24
| | | | | | | | The 'user_edit' permission is required to edit users. The admin pages on UK council cobrands only allow editing of users whose from_body is the same as the logged-in user, or who have sent reports or updates to the council.
* Require 'report_edit' permission for editing reports in adminDave Arter2016-08-17-0/+47
|
* Shrink test sample photo.Matthew Somerville2016-08-16-3/+3
|
* Direct report moderated emails correctly.Matthew Somerville2016-08-10-5/+9
|
* Feature to create report as body/other user.Zarino Zappia2016-08-10-0/+194
| | | | | | | | | | | | This allows users who have the correct permissions to add reports on behalf of the body or another user. We enable editing of the email box by default, so that if JavaScript isn't available, someone can still change the email for the 'another user' option. For mysociety/fixmystreetforcouncils#10 and mysociety/fixmystreetforcouncils#11
* Add HTML email templates.Matthew Somerville2016-08-01-130/+95
| | | | | | | | | | | | | | | | | | | | | | | | Design is all Zarino. This adds the ability to send HTML emails, including attached inline images. When included, this is done as a multipart/related email containing a multipart/alternative (of plain and HTML) and any attached images, so that the images are available even if HTML mail is not. The alert emails list data has been improved so it can be constructed in the templates rather than the code. Various templates have been tidied. Various workarounds for email clients have been made, including: * <th> is used so that the Android 4.x mail client can give them `block` styling in the small screen media query. * Font settings defined on every table cell (<th>) so that sans-serif fonts are used in Outlook, rather than Times New Roman. * A three-column wrapper table to create a 620px centred content area that also shrinks down on narrow screens. (Outlook doesn’t like max-width, so this is the simplest alternative.) * Enforcing a sensible (500px) min-width for the main content area, on clients that don’t support media queries (eg: native Gmail app). * Giant borders on buttons so Outlook displays them * Image alignment with align rather than float.
* Use improved TestMech::create_user_ok instead of User::find_or_createDave Arter2016-07-19-128/+44
| | | | | This improves create_user_ok to work more like create_body_ok where extra params can be passed in and set on the model.
* [UK Councils] Council users can only see their own council's adminDave Arter2016-07-19-9/+43
|
* Use normal user authentication to control access to /adminMatthew Somerville2016-07-19-0/+80
| | | | | | | | | - Adds is_superuser flag to User - Logged-in user must be a superuser or have from_body set in order to access anything within /admin - has_permission_to on a superuser will always return true - Only superusers can create/grant superusers - New `createsuperuser` command for creating superusers
* Merge branch '400-editing-category'Matthew Somerville2016-07-15-1/+2
|\
| * Allow editing of category on admin report edit.Matthew Somerville2016-07-15-1/+2
| | | | | | | | This also updates the body column to match the category.
* | Stop using collapse filter in category template.Matthew Somerville2016-07-15-1/+1
|/ | | | | | If a category had eg. a double space, the use of the filter meant it was output in the HTML with only a single space and so woudn't match the database entry. Switch to more explicit template space chomping.
* Add two-tier responsibility note to confirm emailDave Arter2016-07-08-0/+7
|
* Refactor sending of problem confirmation emailDave Arter2016-07-08-0/+38
| | | | | | | | Replaced duplicate code blocks that are responsible for sending confirmation of problem email with a function. Should make it easier to do two-tier conditional messages later on. Also fixes a minor bug where the wrong confirmation email would be sent for reports from the mobile app to unresponsive councils.
* Stub out calls to Gaze when running testsDave Arter2016-07-08-1/+1
| | | | The tests were running slowly because of gaze.mysociety.org's rate-limiting.
* Fix CSRF issue with new login during process.Matthew Somerville2016-07-05-0/+1
| | | | | | If you had no session cookie, started reporting a problem, logged in through that process, you would then get a CSRF error as the token had been created before the session was.
* Make sure map JS works through an admin proxy.Matthew Somerville2016-07-04-1/+1
| | | | | Tidy up use of absolute URLs when in the admin. Have the 404 handler spot static files in admin as a fallback.
* Merge branch '1347-fold-back-zurich'Matthew Somerville2016-06-29-20/+12
|\
| * Add external field editing to admin report edit.Matthew Somerville2016-06-29-20/+12
| | | | | | | | Show bodies for which details are missing, and any send method used.
* | Use valid orientation flag for test imageDave Arter2016-06-27-3/+3
|/ | | | | | jhead 3.00 considers 0 an invalid value for EXIF orientation and will replace it with 1 when run with the -autorot flag. This was causing a test failure as the SHA hash of the sample image was being changed.
* Allow admin to edit user's phone number.Matthew Somerville2016-06-22-0/+5
|
* Merge branch '360-change-email'Matthew Somerville2016-06-20-114/+117
|\
| * Allow users to update their email address.Matthew Somerville2016-06-20-3/+51
| |
| * Improve CSRF tokens and add to more forms.Matthew Somerville2016-06-20-111/+66
| |
* | Fix check for old-style parsed XML.Dave Arter2016-06-16-0/+8
|/ | | | | It errored on new-style parsed XML, rather than let it through. Add a new category to the test that highlights this.
* Fix broken test due to missing config override.Matthew Somerville2016-05-27-2/+7
|
* Merge branch '1383-remove-dead-projects'Matthew Somerville2016-04-22-56/+32
|\
| * Update tests for cobrand/template changes.Matthew Somerville2016-04-20-56/+32
| |
* | Fix Twitter authentication test.Matthew Somerville2016-04-22-2/+5
| | | | | | | | Pull in the same fix that was made in f598f56f for the Facebook tests.
* | Merge remote-tracking branch 'origin/twitter-login'Matthew Somerville2016-04-22-0/+111
|\ \ | |/ |/|
| * Add Twitter social login.Matthew Somerville2016-04-08-0/+111
| |
* | Merge remote-tracking branch 'origin/1302-support-pngs'Matthew Somerville2016-04-20-4/+7
|\ \
| * | Add PNG image support.Matthew Somerville2016-04-08-4/+4
| | | | | | | | | | | | | | | | | | | | | Store image type along with hash in photo column, and use that when outputting images / generating URLs. Make sure all public photo URL generation goes through appropriate functions, and change temp URLs so the filename can be output directly from the list.
| * | Prevent dev sites auto-creating session.Matthew Somerville2016-04-06-0/+3
| |/ | | | | | | | | We check for a session's existence before looking in it, as looking in it first would auto create a session.
* / Cope with a '/' in body name in body slug.Matthew Somerville2016-04-20-0/+5
|/ | | | Fixes #574.
* Fix test issue running on PostgreSQL>=9.2 on Mac.Matthew Somerville2016-03-31-1/+2
| | | | | | | | | | Test::PostgreSQL sets up a new database with initdb and empties the generated postgresql.conf; PostgreSQL 9.2+ sets its locale/timezone information at the initdb stage, not when it is run. It is possible therefore for the tests to be in one timezone but the test database to be in another (GMT) – causing a test failure when e.g. an update is created manually. Make sure the first comment is well before the others being tested, so there is no chance the order gets confused.
* Merge remote-tracking branch 'mysociety/refactor-email'Matthew Somerville2016-03-31-5/+5
|\
| * Refactor email handling to use Email::MIME alone.Matthew Somerville2016-03-30-5/+5
| |