diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 3 | ||||
-rw-r--r-- | templates/web/base/admin/list_updates.html | 6 | ||||
-rw-r--r-- | templates/web/base/admin/problem_row.html | 6 |
4 files changed, 13 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 003ec4bb9..ff3d28d7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Admin improvements: - Inspectors can set non_public status of reports. #1992 - Default start date is shown on the dashboard. + - Users with 'user_edit' permission can search for users/reports. #2027 - Development improvements: - Add HTML email previewer. diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 1883550e5..03a6c1a83 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -667,6 +667,7 @@ sub admin_pages { $pages->{responsepriority_edit} = [ undef, undef ]; }; if ( $user->has_body_permission_to('user_edit') ) { + $pages->{reports} = [ _('Reports'), 2 ]; $pages->{users} = [ _('Users'), 6 ]; $pages->{user_edit} = [ undef, undef ]; } @@ -727,7 +728,7 @@ sub available_permissions { # trusted => _("Trusted to make reports that don't need to be inspected"), }, _("Users") => { - user_edit => _("Edit other users' details"), + user_edit => _("Edit users' details/search for their reports"), user_manage_permissions => _("Edit other users' permissions"), user_assign_body => _("Grant access to the admin"), user_assign_areas => _("Assign users to areas"), # future use diff --git a/templates/web/base/admin/list_updates.html b/templates/web/base/admin/list_updates.html index d759a2354..4b8b26d3c 100644 --- a/templates/web/base/admin/list_updates.html +++ b/templates/web/base/admin/list_updates.html @@ -39,7 +39,11 @@ <br>[% loc('Confirmed:') %] [% PROCESS format_time time=update.confirmed %] </small></td> <td>[% update.text | html %]</td> - <td><a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a></td> + <td> + [% IF c.user.has_permission_to('report_edit', update.problem.bodies_str_ids) %] + <a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a> + [% END %] + </td> </tr> [% END -%] </table> diff --git a/templates/web/base/admin/problem_row.html b/templates/web/base/admin/problem_row.html index 446e94d66..99142af4e 100644 --- a/templates/web/base/admin/problem_row.html +++ b/templates/web/base/admin/problem_row.html @@ -38,6 +38,10 @@ [%- IF problem.is_closed %]<br>[% prettify_state('closed') %]: [% PROCESS format_time time=problem.lastupdate %][% END -%] [%- IF problem.is_open %]<br>[% loc('Last update:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%] </small></td> - <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td> + <td> + [% IF c.user.has_permission_to('report_edit', problem.bodies_str_ids) %] + <a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a> + [% END %] + </td> </tr> [%- END -%] |