[ https://issues.apache.org/jira/browse/TC-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16103574#comment-16103574 ]
ASF GitHub Bot commented on TC-462: ----------------------------------- Github user mitchell852 commented on a diff in the pull request: https://github.com/apache/incubator-trafficcontrol/pull/751#discussion_r129905512 --- Diff: traffic_ops/app/lib/API/DeliveryServiceRegexes.pm --- @@ -66,6 +73,12 @@ sub index { return $self->not_found(); } + my $tenant_utils = Utils::Tenant->new($self); + my $tenants_data = $tenant_utils->create_tenants_data_from_db(); + if (!$tenant_utils->is_ds_resource_accessible($tenants_data, $ds->tenant_id)) { + return $self->forbidden(); --- End diff -- can you put a message in here like return $self->forbidden('this delivery service belongs to a tenant you are not authorized to see'); ... or something like that > Delivery-service tenancy based access control - Regexes > ------------------------------------------------------- > > Key: TC-462 > URL: https://issues.apache.org/jira/browse/TC-462 > Project: Traffic Control > Issue Type: Improvement > Components: Traffic Ops > Reporter: Nir Sopher > > We have recently added "tenancy" to the project. > With tenancy, every resource have a tenant, where resource can be a > delivery-service, a server (future) and even a user. > We are now starting to enforce access-control based on the resource tenancy. > A user can manage a resource only if the resource is under the user tenancy. > This JIRA deals with another step of "delivery-service as a resource" - > enforcing via the API access control on DS regexes. -- This message was sent by Atlassian JIRA (v6.4.14#64029)