dneuman64 closed pull request #1921: [Issue-1920] - requires portal role (or
equivalent/above) to manage delivery service steering targets
URL: https://github.com/apache/incubator-trafficcontrol/pull/1921
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docs/source/development/traffic_ops_api/v12/steering_target.rst
b/docs/source/development/traffic_ops_api/v12/steering_target.rst
index bf10a28300..0708240730 100644
--- a/docs/source/development/traffic_ops_api/v12/steering_target.rst
+++ b/docs/source/development/traffic_ops_api/v12/steering_target.rst
@@ -146,7 +146,7 @@ Steering Targets
Authentication Required: Yes
- Role(s) Required: Admin or Steering
+ Role(s) Required: Portal
**Request Route Parameters**
@@ -226,7 +226,7 @@ Steering Targets
Authentication Required: Yes
- Role(s) Required: Admin or Steering
+ Role(s) Required: Portal
**Request Route Parameters**
@@ -306,7 +306,7 @@ Steering Targets
Authentication Required: Yes
- Role(s) Required: Admin or Steering
+ Role(s) Required: Portal
**Request Route Parameters**
diff --git a/traffic_ops/app/lib/API/DeliveryService/SteeringTarget.pm
b/traffic_ops/app/lib/API/DeliveryService/SteeringTarget.pm
index d99732e276..7ea4deedf2 100644
--- a/traffic_ops/app/lib/API/DeliveryService/SteeringTarget.pm
+++ b/traffic_ops/app/lib/API/DeliveryService/SteeringTarget.pm
@@ -104,7 +104,7 @@ sub update {
my $target_ds_id = $self->param('target_id');
my $params = $self->req->json;
- if ( !&is_admin($self) && !&is_steering($self) ) {
+ if ( !&is_portal($self) ) {
return $self->forbidden();
}
@@ -175,7 +175,7 @@ sub create {
my $steering_ds_id = $self->param('id');
my $target_ds_id = $params->{targetId};
- if ( !&is_admin($self) && !&is_steering($self) ) {
+ if ( !&is_portal($self) ) {
return $self->forbidden();
}
@@ -246,7 +246,7 @@ sub delete {
my $steering_ds_id = $self->param('id');
my $target_ds_id = $self->param('target_id');
- if ( !&is_admin($self) && !&is_steering($self) ) {
+ if ( !&is_portal($self) ) {
return $self->forbidden();
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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