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/04/20 16:05:55 UTC

[2/5] incubator-trafficcontrol git commit: Org tenancy, tenant name in API, recommit minor fix

Org tenancy, tenant name in API, recommit minor fix


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

Branch: refs/heads/master
Commit: cc679cc9d10877b9c903802eb4eff01f75c28212
Parents: e39428f
Author: Ori Finkelman <or...@qwilt.com>
Authored: Tue Apr 18 22:46:41 2017 +0300
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Thu Apr 20 10:05:19 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/lib/API/User.pm  | 2 +-
 traffic_ops/app/t/api/1.2/user.t | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/cc679cc9/traffic_ops/app/lib/API/User.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/User.pm b/traffic_ops/app/lib/API/User.pm
index 3831392..72c1a4c 100644
--- a/traffic_ops/app/lib/API/User.pm
+++ b/traffic_ops/app/lib/API/User.pm
@@ -314,7 +314,7 @@ sub current {
 		return $self->success( @data );
 	}
 	else {
-		my $dbh = $self->db->resultset('TmUser')->search( { username => $current_username } , { prefetch => [ 'role' , 'tenant'] } );
+		my $dbh = $self->db->resultset('TmUser')->search( { username => $current_username } , { prefetch => [ 'role' , 'tenant' ] } );
 		while ( my $row = $dbh->next ) {
 			push(
 				@data, {

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/cc679cc9/traffic_ops/app/t/api/1.2/user.t
----------------------------------------------------------------------
diff --git a/traffic_ops/app/t/api/1.2/user.t b/traffic_ops/app/t/api/1.2/user.t
index d1488a9..8d13c4a 100644
--- a/traffic_ops/app/t/api/1.2/user.t
+++ b/traffic_ops/app/t/api/1.2/user.t
@@ -51,6 +51,7 @@ sub run_ut {
 
 	ok my $portal_user = $schema->resultset('TmUser')->find( { username => $login_user } ), 'Tenant $tenant_name: Does the portal user exist?';
 
+
 	# Verify the Portal user
 	$t->post_ok( '/api/1.2/user/login', json => { u => $login_user, p => $login_password} )->status_is(200);
 	$t->get_ok('/api/1.2/user/current.json')->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )