| Commit message (Collapse) | Author | Age | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This includes a refactor of the state dropdown field into its own template for easy reuse.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|\ |
|
| | |
|
|/
|
|
|
| |
- 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
|
|
|
|
|
| |
This is less confusing than redirecting to /auth and then to /my
(as they're logged in). Fixes #1566.
|
|
|
|
| |
Fix title if error in adding user. Fixes #1510.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
When a trusted user makes a report in a category that requires inspection, it'll
be sent immediately (i.e. without being inspected first).
|
| |
|
|
|
|
| |
Fixes (the first part of) #1138.
|
| |
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
| |
Adapt code so that it could be opened up more in future.
|
|
|
|
| |
Stop IDs being shown on 404 pages, provide a nicer message on 403 pages.
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
The config page is only accessible by superusers.
The stats page only shows figures for the user’s from_body unless superuser.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This is a continuation of b45b29c8.
|
|
|
|
| |
(VERSION disappears in some recent version.)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
This also updates the body column to match the category.
|
|
|
|
| |
Show bodies for which details are missing, and any send method used.
|
|
|
|
|
| |
Show map, break into two columns, fix display of sent time after
clicking "Mark as sent", tidy up labels.
|
| |
|
| |
|