aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Admin.pm
Commit message (Collapse)AuthorAgeLines
* Admin ability to remove user account details.Matthew Somerville2018-02-06-0/+24
|
* Add admin ability to log user out.Matthew Somerville2018-02-06-0/+11
|
* Admin ability to hide a user's reports/updates.Matthew Somerville2018-01-31-16/+26
|
* Admin ability to make user anonymous.Matthew Somerville2018-01-31-2/+11
|
* Add some new Body model helper methods.Matthew Somerville2018-01-03-11/+4
| | | | And use the existing ones more.
* Fix spelling of administrator.Matthew Somerville2017-12-15-1/+1
|
* Fix issues with send method category change.Matthew Somerville2017-12-13-8/+5
| | | | | | Use the send method recorded at the time of sending, not the current one (it may have changed since), and only resend if the new send methods are not a subset of the old.
* Only allow one auto-response template per category/state.Dave Arter2017-12-04-6/+39
|
* Consolidate summary statistics pages.Matthew Somerville2017-11-29-1/+1
|
* Refactor stats pages to their own controller.Matthew Somerville2017-11-29-150/+1
|
* allow admin to unban a userStruan Donald2017-11-07-3/+27
| | | | | | | Add an unban button to the user edit page when a user is in the abuse table. Fixes #1881
* do not override template when displaying body contacts as textStruan Donald2017-11-07-1/+4
| | | | | | | move setting the body template to before `fetch_contacts` so it doesn't override setting the text only email address template. Fixes #1895
* Fix issue editing user previously lacking a name.Matthew Somerville2017-11-07-3/+4
| | | | | The check that a name was entered was testing the user's current name, not the name entered in the form.
* log all state changes in admin as commentsStruan Donald2017-10-16-1/+22
| | | | | | | | | | | | Create a comment on a problem when the admin is used to change the state of the problem. If only the state is changed then create a comment with blank text. If the category and state are changing then include details of the category change in the comment. Not all the state changes are displayed at the template level by default. Fixes #1846
* Accept +1 geographic numbers as possibly mobile.Matthew Somerville2017-10-05-32/+31
| | | | | We have no way of knowing whether a +1 geographic number is fixed line or mobile, so accept them all as potentially mobile.
* correctly handle category changes in inspector formStruan Donald2017-10-04-11/+16
| | | | | | | | | | | This resolves two issues when updating the report category in the staff users inspect form: * report category is only updated if the rest of the form is valid * only one update on the report is left Previously changing the category would create an update in addition to any public update created, and the category was always updated even when validation errors occurred elsewhere in the form.
* Update admin interface for 'phone' users.Matthew Somerville2017-09-30-124/+209
| | | | | | | This includes search/flagging users, editing user on the report and update edit pages, and user adding/editing itself. Add some more tests for user adding/editing.
* Add 'verified' database columns for email/phone.Matthew Somerville2017-09-30-1/+2
| | | | | These are so we can state whether a user's email address or phone number have been verified by confirmation email/text.
* area stats page for staff usersStruan Donald2017-09-20-2/+9
| | | | | | | | | Admin page to show some simple summary stats for an area. If the user has been assigned to an area then they will see the stats for that area. Superusers can pick which area they want to view. For mysociety/fixmystreetforcouncils#2
* Fix issue editing category with '/' in it.Matthew Somerville2017-09-11-35/+7
| | | | | | Simplify chaining of body/category admin URLs so that all categories are treated the same, with `/` or without, and the template will then always have its CSRF token.
* Fix bug if first page after restart is admin.Matthew Somerville2017-09-11-5/+1
| | | | | | | | If the first page looked at after server launch was an admin one, the User object was getting a different schema attached than the one used by everything else (so e.g. the cobrand was not then available to it, causing a crash on a body page). Using auto instead of begin prevents this from happening, as the setup_request auto always runs first.
* Sort languages in template.Matthew Somerville2017-08-25-1/+1
|
* Add site-wide extra fields for reports, and admin UI to manageDave Arter2017-08-17-0/+42
| | | | | | | - Also provides an editor for the extra Open311 fields on contacts. - Adds .btn--small class for small buttons Fixes #1743.
* Add fn to fetch bodies plus the translated names.Matthew Somerville2017-08-15-1/+1
|
* translate report template category names in controllerStruan Donald2017-08-14-1/+1
| | | | | | | We can't translate them in the template as we're just passing in the category name and not the object. Fixes mysociety/fixmystreetforcouncils#216
* Prevent unnecessary string translation.Matthew Somerville2017-08-11-2/+0
| | | | | | Calling the function 'translate' causes gettext-extract to add the string to the .po file. Also, we no longer need an admin 'updated' message as the main form has its own success message.
* Body/category translation admin interface.Struan Donald2017-08-10-32/+151
|
* Set up translatable category columns.Matthew Somerville2017-08-10-2/+2
| | | | | | As category is used both for display and as a link between Problem and Contact tables, add `category_display` for use whenever a category is displayed.
* Resend report if changing to category with different send_methodDave Arter2017-07-26-0/+17
| | | | | | | If a report’s category is changed to one with a different send_method to the original category, the report needs to be resent. Fixes mysociety/fixmystreetforcouncils#209
* Add inactive state to categories.Matthew Somerville2017-07-14-11/+10
| | | | | A new 'state' column replaces confirmed and deleted, allowing categories to be unconfirmed, confirmed, deleted or inactive.
* Don't resend if category change subsets body.Matthew Somerville2017-06-20-3/+3
| | | | | | Instead of checking if the list of bodies has changed at all, mark the report for resending if there is a body in the new list not present in the old.
* 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
|