Github user mitchell852 commented on a diff in the pull request:

    
https://github.com/apache/incubator-trafficcontrol/pull/434#discussion_r112306064
  
    --- Diff: traffic_ops/app/lib/API/User.pm ---
    @@ -281,11 +284,14 @@ sub current {
     
        if ( &is_ldap($self) ) {
                my $role = $self->db->resultset('Role')->search( { name => 
"read-only" } )->get_column('id')->single;
    +           my $user_tenant_id = $self->current_user_tenant();
    --- End diff --
    
    just so you know. $self->current_user_tenant() will alway return undef in 
this case. if you are is_ldap, that means you have no entry in the tm_user 
table...so in my opinion, you might just want to hardcode this to undef and 
save the unnecessary query.
    
    "tenantId"    => undef,
     "tenant"          => undef,
    
    go take a look at is_ldap to see what i mean: 
https://github.com/apache/incubator-trafficcontrol/blob/master/traffic_ops/app/lib/UI/Utils.pm#L257


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to