#929 implement first half of multi tenancy with tenant_databases setting

This commit is contained in:
Oliver Gorwits
2022-09-24 19:01:05 +01:00
parent b391f83d60
commit 1d5f3ce316
71 changed files with 355 additions and 205 deletions

View File

@@ -45,7 +45,7 @@ get '/ajax/content/search/port' => require_login sub {
my $rs;
if ($q =~ m/^[0-9]+$/ and $q < 4096) {
$rs = schema('netdisco')->resultset('DevicePort')
$rs = schema(vars->{'tenant'})->resultset('DevicePort')
->columns( [qw/ ip port name up up_admin speed /] )->search({
"port_vlans.vlan" => $q,
( param('uplink') ? () : (-or => [
@@ -70,7 +70,7 @@ get '/ajax/content/search/port' => require_login sub {
and (($mac->as_ieee eq '00:00:00:00:00:00')
or ($mac->as_ieee !~ m/$RE{net}{MAC}/)));
$rs = schema('netdisco')->resultset('DevicePort')
$rs = schema(vars->{'tenant'})->resultset('DevicePort')
->columns( [qw/ ip port name up up_admin speed /] )
->search({
-and => [