rawlinp commented on a change in pull request #3742: Restricted job creation to 
Portal and above
URL: https://github.com/apache/trafficcontrol/pull/3742#discussion_r307885204
 
 

 ##########
 File path: traffic_ops/app/lib/API/Job.pm
 ##########
 @@ -181,7 +185,7 @@ sub create_current_user_job {
                        return $self->forbidden("Forbidden. Delivery-service 
tenant is not available to the user.");
                }
        } else {
-               if ( !&is_oper($self) && 
!$self->is_delivery_service_assigned($ds_id) ) {
+               if ( !&is_portal($self) && 
!$self->is_delivery_service_assigned($ds_id) ) {
 
 Review comment:
   The `use_tenancy` parameter might still exist in the global profile, but 
there shouldn't be any code that actually checks that parameter anymore. Nobody 
should be adding code that checks that parameter, either. In the Perl, pretty 
much all the code that checked tenancy used that `$tenant_utils->use_tenancy()` 
parameter, so I decided to just make that function always return true instead 
of removing all the places in the Perl that the `use_tenancy()` function was 
called. I would be -1 on going back and removing all the code in the Perl that 
checks the `use_tenancy()` function currently, since that would not be worth 
doing now.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to