diff options
author | Struan Donald <struan@exo.org.uk> | 2018-11-01 10:50:38 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2018-11-19 13:29:49 +0000 |
commit | b4618c61ff5ddf6db9662b06bc55a0f74b43c903 (patch) | |
tree | 17e4c2a7651a60b14bd37a2bc2d19f670ddc4153 /perllib | |
parent | b35552138fd66673df46747549989d545bbcfa9f (diff) |
add default_to_body permission
If a user has this permission then the report_as dropdown will
default to reporting as the body.
For mysociety/freshdesk#23
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UKCouncils.pm | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index d71b96392..c6616a003 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -724,6 +724,7 @@ sub available_permissions { contribute_as_another_user => _("Create reports/updates on a user's behalf"), contribute_as_anonymous_user => _("Create reports/updates as anonymous user"), contribute_as_body => _("Create reports/updates as the council"), + default_to_body => _("Default to creating reports/updates as the council"), view_body_contribute_details => _("See user detail for reports created as the council"), # NB this permission is special in that it can be assigned to users diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index 72f6ff89e..7eb63a371 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -215,6 +215,7 @@ sub available_permissions { my $self = shift; my $perms = $self->next::method(); + $perms->{Problems}->{default_to_body} = "Default to creating reports/updates as " . $self->council_name; $perms->{Problems}->{contribute_as_body} = "Create reports/updates as " . $self->council_name; $perms->{Problems}->{view_body_contribute_details} = "See user detail for reports created as " . $self->council_name; $perms->{Users}->{user_assign_areas} = "Assign users to areas in " . $self->council_name; |