Github user nir-sopher commented on a diff in the pull request:

    
https://github.com/apache/incubator-trafficcontrol/pull/742#discussion_r129144946
  
    --- Diff: traffic_ops/app/lib/API/Deliveryservice.pm ---
    @@ -909,8 +945,13 @@ sub capacity {
        my $id = $self->param('id');
     
        if ( $self->is_valid_delivery_service($id) ) {
    -           if ( $self->is_delivery_service_assigned($id) || 
&is_admin($self) || &is_oper($self) ) {
    +           my $tenant_utils = Utils::Tenant->new($self);
    +           my $tenants_data = $tenant_utils->create_tenants_data_from_db();
    +           if ( $self->is_delivery_service_assigned($id) || 
$tenant_utils->ignore_ds_users_table() || &is_admin($self) || &is_oper($self) ) 
{
    --- End diff --
    
    I'll remove "is_admin", I didn't do so in the first place because I was 
trying to minimize the risk on existing functionality, so I did not change 
existing code.
    
    I do not understand the remark about the "if 
$tenant_utils->ignore_ds_users_table() is true then it doesn't matter if 
is_delivery_service_assigned($id), does it" - you are correct, but this is the 
reason things are ORed


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to