push(@ctx_orgs, $ctx->{physical_loc}) if $ctx->{physical_loc};
push(@ctx_orgs, $ctx->{user}->home_ou) if $ctx->{user};
+ # if the global copy loc group setting is enabled,
+ # load all copy location groups, regardless of context
+ my $global = $ctx->{get_org_setting}->(
+ $ctx->{physical_loc} || $ctx_orgs[0],
+ 'opac.global_copy_location_groups');
+
+ @ctx_orgs = ($ctx->{aou_tree}->()->id) if $U->is_true($global);
+
my $grps = $self->editor->search_asset_copy_location_group([
{
opac_visible => 't',