aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Admin.pm
Commit message (Collapse)AuthorAgeLines
* Fix issue with categories with regex characters.Matthew Somerville2017-04-13-2/+3
| | | | | | As the templates were using `grep`, they failed to match on a category such as "Footpaths (right of way)". Changing the stash variables to be hashes instead of lists makes checking for a key simpler. Fixes #1688.
* Allow comma-separated contact emails in the adminDave Arter2017-04-10-3/+4
| | | | | | | The report-sending code has allowed multiple emails for a long time, but the admin wouldn't allow you to enter multiple emails for each contact. Fixes mysociety/FixMyStreet-Commercial#835
* [SeeSomething] Remove cobrand.Matthew Somerville2017-03-31-1/+1
|
* Check cobrand users list when admin merging users.Matthew Somerville2017-03-09-1/+8
|
* Make sure emails are lowercased in admin.Matthew Somerville2017-03-09-17/+14
|
* Send open reports regardless of current stateDave Arter2017-02-20-1/+1
|
* [Oxfordshire] Add initials field to admin user edit formDave Arter2017-02-15-0/+13
|
* Redirect after user creation/editDave Arter2017-01-19-7/+9
| | | | | Solves a minor bug where it was difficult to create a new user and immediately assign permissions, as the page didn't show the appropriate permissions UI.
* Update has_body_permission_to to allow superusers.Matthew Somerville2017-01-10-4/+3
|
* Allow editing of ResponseTemplate state in adminDave Arter2017-01-10-0/+1
| | | | This includes a refactor of the state dropdown field into its own template for easy reuse.
* [Zurich] Fix 500 error when editing superusersDave Arter2016-12-06-1/+1
| | | | | | | | | | | | The Zurich::admin_type function was setting $c->stash->{body}, meaning that when trying to edit a superuser the 'fetch_contacts' function wasn't being called, causing an "Can't call method "all" on an undefined value" error as $c->stash->{live_contacts} wasn't ever being set. Fixed by changing the conditional to simply determine whether fetch_contacts needs to be called. Included a regression test that meant a small addition to the MapItZurich mock.
* Better path for showing config git version.Matthew Somerville2016-12-02-1/+1
| | | | | | The default cobrand does not have a template directory, so the directory change to it was not working. Use the root directory of the repository instead.
* Merge branch '1544-category-change-leave-update'Matthew Somerville2016-11-01-0/+11
|\
| * Leave a public update when admin changes category.Matthew Somerville2016-10-28-0/+11
| |
* | Add UI for assigning categories to a user in adminDave Arter2016-10-28-0/+27
|/ | | | | - A user can be assigned to any number of its body's categories - The category ids are stored as a list in the user's extra field
* Error if logged-in user visits admin without permission.Matthew Somerville2016-10-26-1/+4
| | | | | This is less confusing than redirecting to /auth and then to /my (as they're logged in). Fixes #1566.
* Show admin user edit errors.Matthew Somerville2016-10-26-4/+4
| | | | Fix title if error in adding user. Fixes #1510.
* Redirect to correct cobrand when category changed.Dave Arter2016-10-26-12/+0
|
* Resend report if changing category changes body.Dave Arter2016-10-26-3/+7
|
* Hide confirmed column if all categories confirmed.Matthew Somerville2016-10-24-0/+1
|
* Add UI for managing category reputation thresholdDave Arter2016-09-23-0/+3
|
* Add ‘trusted’ flag allowing users to make reports directlyDave Arter2016-09-20-2/+31
| | | | | When a trusted user makes a report in a category that requires inspection, it'll be sent immediately (i.e. without being inspected first).
* Remove from_body requirement from User::has_permission_toDave Arter2016-09-20-1/+1
|
* Don't reject email when editing Open311 contactsDave Arter2016-09-20-2/+6
| | | | Fixes (the first part of) #1138.
* Fix admin user search for non-superusersDave Arter2016-09-16-9/+11
|
* [Zurich] Restore admin user edit functionalityDave Arter2016-09-16-2/+2
| | | | | | - Zurich users don't need permission to access user_edit page - from_body can be set to any body by Zurich admin users, not just their own - Don't show the area field on user_edit form
* Add new category_edit restriction for viewing body admin.Matthew Somerville2016-09-09-3/+9
|
* Admin flagged page for superusers only.Matthew Somerville2016-09-09-8/+7
| | | | Adapt code so that it could be opened up more in future.
* Better generic 403/404 pages.Matthew Somerville2016-09-09-9/+9
| | | | Stop IDs being shown on 404 pages, provide a nicer message on 403 pages.
* Add manage screen for editing priority/category.Matthew Somerville2016-09-09-10/+7
| | | | | | | 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).
* Add ‘Inspection required’ field to categoriesDave Arter2016-09-09-1/+7
| | | | | | | | | | | Categories can now require reports to be marked as 'inspected' via the frontend before they're sent by send-reports. A side-effect here is that send-reports will perform an extra n queries for each report, where n is the number of bodies that report is being sent to, but hopefully in practice this won't matter as it's an offline cronjob. See mysociety/fixmystreetforcouncils#50
* Simplify some permissions logic with extra helper methodDave Arter2016-09-08-5/+4
|
* Extend response templates to work across all cobrandsDave Arter2016-09-08-36/+66
| | | | | | | | | | | 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
* Add inspector report detail viewDave Arter2016-09-06-6/+65
| | | | | | | | | | | | | Users with the `report_inspect` permission can click a new 'inspect' button on a report page to input more detailed problem information into a new form that appears in a column alongside the report detail. - Inspector data is stored in problem's 'extra' field - Report category/state can be edited - Location can be changed by dragging the pin or HTML5 geolocation (Factored out Zurich admin pin drag into own function) For mysociety/fixmystreetforcouncils#22
* Allow user to have an area assigned in adminDave Arter2016-08-22-1/+38
|
* Restrict admin config/stats pagesDave Arter2016-08-17-21/+9
| | | | | The config page is only accessible by superusers. The stats page only shows figures for the user’s from_body unless superuser.
* Allow user permissions to be granted/revoked in adminDave Arter2016-08-17-3/+26
|
* Restrict from_body editing to superusersDave Arter2016-08-17-1/+9
| | | | | | | Superusers can set a user's from_body to any value, but a normal staff user can only set another user's from_body to the same as their own or undefined. This is presented in the UI as a 'staff' tickbox.
* Restrict user editing in adminDave Arter2016-08-17-3/+9
| | | | | | | | 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/+7
|
* Fix other "keys on reference" warning.Matthew Somerville2016-08-08-1/+1
| | | | This is a continuation of b45b29c8.
* Test for Image::Magick installation better.Matthew Somerville2016-08-01-1/+0
| | | | (VERSION disappears in some recent version.)
* Fix "keys on reference is experimental" warning in Perl 5.20+Dave Arter2016-07-21-1/+1
|
* Respect cobrand restriction for unsent reportsDave Arter2016-07-19-1/+1
|
* Disallow empty name when creating/editing bodies in adminDave Arter2016-07-19-17/+32
|
* Restrict add/editing of bodies in admin to superusersDave Arter2016-07-19-2/+7
|
* Use normal user authentication to control access to /adminMatthew Somerville2016-07-19-3/+9
| | | | | | | | | - 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
* Allow editing of category on admin report edit.Matthew Somerville2016-07-15-1/+27
| | | | This also updates the body column to match the category.
* Add external field editing to admin report edit.Matthew Somerville2016-06-29-47/+20
| | | | Show bodies for which details are missing, and any send method used.
* Improve admin report edit page.Matthew Somerville2016-06-29-17/+14
| | | | | Show map, break into two columns, fix display of sent time after clicking "Mark as sent", tidy up labels.