aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Admin/Users.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-05-12 09:16:00 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-05-12 09:16:00 +0100
commit8534d726c54ff5ac130a5b4dda84ff4a2c00482f (patch)
treea865dc79b25426841a2da09b3d0e93e7d1dbcc29 /perllib/FixMyStreet/App/Controller/Admin/Users.pm
parent37306b9f6f4cb9b58c5e4a7bdc12e90dff879481 (diff)
parentd1622dc20c1623e3f7fb54d72d99370af796c197 (diff)
Merge branch 'tfl-category-restrictions'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin/Users.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin/Users.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin/Users.pm b/perllib/FixMyStreet/App/Controller/Admin/Users.pm
index 046e19126..f4b9bd7dc 100644
--- a/perllib/FixMyStreet/App/Controller/Admin/Users.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin/Users.pm
@@ -373,6 +373,11 @@ sub edit : Chained('user') : PathPart('') : Args(0) {
my @live_contact_ids = map { $_->id } @live_contacts;
my @new_contact_ids = grep { $c->get_param("contacts[$_]") } @live_contact_ids;
$user->set_extra_metadata('categories', \@new_contact_ids);
+ if ($c->get_param('assigned_categories_only')) {
+ $user->set_extra_metadata(assigned_categories_only => 1);
+ } else {
+ $user->unset_extra_metadata('assigned_categories_only');
+ }
} else {
$user->unset_extra_metadata('categories');
}