You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2017/07/25 18:56:37 UTC

[06/17] incubator-trafficcontrol git commit: DS tenancy tests - UI - filter the presented list

DS tenancy tests - UI - filter the presented list


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/a739ba39
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/a739ba39
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/a739ba39

Branch: refs/heads/master
Commit: a739ba393cf2f1c438f8bea2cff6f26c1c433de2
Parents: 3c3367f
Author: nir-sopher <ni...@qwilt.com>
Authored: Mon Jun 26 00:56:23 2017 +0300
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Tue Jul 25 12:55:59 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/lib/UI/Cdn.pm | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a739ba39/traffic_ops/app/lib/UI/Cdn.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/UI/Cdn.pm b/traffic_ops/app/lib/UI/Cdn.pm
index 82aaa53..cfc940f 100644
--- a/traffic_ops/app/lib/UI/Cdn.pm
+++ b/traffic_ops/app/lib/UI/Cdn.pm
@@ -464,7 +464,14 @@ sub adeliveryservice {
         }
     );
 
+    my $tenant_utils = UI::TenantUtils->new($self);
+    my $tenants_data = $tenant_utils->create_tenants_data_from_db();
+
     while ( my $row = $rs->next ) {
+        if (!$tenant_utils->is_user_resource_accessible($tenants_data, $row->tenant_id)) {
+            next;
+        }
+
         my $cdn_name = defined( $row->cdn_id ) ? $row->cdn->name : "";
 
         # This will be undefined for 'Steering' delivery services