You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2018/05/18 17:46:15 UTC

[incubator-trafficcontrol] branch master updated: allow the user to skip delivery service requests if they have the appropriate role as defined in traffic_portal_properties.json

This is an automated email from the ASF dual-hosted git repository.

dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 20709b9  allow the user to skip delivery service requests if they have the appropriate role as defined in traffic_portal_properties.json
20709b9 is described below

commit 20709b9eae2acd9e794d3ebcb556cef373675838
Author: Jeremy Mitchell <mi...@gmail.com>
AuthorDate: Mon May 14 20:59:19 2018 -0600

    allow the user to skip delivery service requests if they have the appropriate role as defined in traffic_portal_properties.json
---
 lib/go-tc/deliveryservice_requests.go              |   4 +-
 traffic_ops/app/lib/API/User.pm                    |   6 +-
 .../edit/FormEditDeliveryServiceController.js      | 219 +++++++++++++++------
 .../new/FormNewDeliveryServiceController.js        |  88 ++++++---
 .../TableDeliveryServiceRequestsController.js      | 196 ------------------
 .../table.deliveryServiceRequests.tpl.html         |  10 -
 .../app/src/traffic_portal_properties.json         |   5 +-
 7 files changed, 231 insertions(+), 297 deletions(-)

diff --git a/lib/go-tc/deliveryservice_requests.go b/lib/go-tc/deliveryservice_requests.go
index 9c7e6ae..7b2a4cf 100644
--- a/lib/go-tc/deliveryservice_requests.go
+++ b/lib/go-tc/deliveryservice_requests.go
@@ -184,8 +184,8 @@ func (r RequestStatus) ValidTransition(to RequestStatus) error {
 			return nil
 		}
 	case RequestStatusComplete:
-		// only pending can be completed.  Completed can never change.
-		if r == RequestStatusPending {
+		// only submitted or pending requests can be completed
+		if r == RequestStatusSubmitted || r == RequestStatusPending {
 			return nil
 		}
 	}
diff --git a/traffic_ops/app/lib/API/User.pm b/traffic_ops/app/lib/API/User.pm
index 8ca4d81..c500999 100644
--- a/traffic_ops/app/lib/API/User.pm
+++ b/traffic_ops/app/lib/API/User.pm
@@ -536,7 +536,7 @@ sub current {
 	my @data;
 	my $current_username = $self->current_user()->{username};
 	if ( &is_ldap($self) ) {
-		my $role = $self->db->resultset('Role')->search( { name => "read-only" } )->get_column('id')->single;
+		my $role = $self->db->resultset('Role')->search( { name => "read-only" } )->single;
 
 		push(
 			@data, {
@@ -545,7 +545,8 @@ sub current {
 				"tenantId"        => undef,
 				"tenant"          => undef,
 				"publicSshKey"    => "",
-				"role"            => $role,
+				"role"            => $role->id,
+				"roleName"        => $role->name,
 				"uid"             => "0",
 				"gid"             => "0",
 				"company"         => "",
@@ -574,6 +575,7 @@ sub current {
 					"username"        => $row->username,
 					"publicSshKey"    => $row->public_ssh_key,
 					"role"            => $row->role->id,
+					"roleName"        => $row->role->name,
 					"uid"             => $row->uid,
 					"gid"             => $row->gid,
 					"company"         => $row->company,
diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/edit/FormEditDeliveryServiceController.js b/traffic_portal/app/src/common/modules/form/deliveryService/edit/FormEditDeliveryServiceController.js
index 67a2f84..7576c8b 100644
--- a/traffic_portal/app/src/common/modules/form/deliveryService/edit/FormEditDeliveryServiceController.js
+++ b/traffic_portal/app/src/common/modules/form/deliveryService/edit/FormEditDeliveryServiceController.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-var FormEditDeliveryServiceController = function(deliveryService, type, types, $scope, $state, $controller, $uibModal, $anchorScroll, locationUtils, deliveryServiceService, deliveryServiceRequestService, messageModel) {
+var FormEditDeliveryServiceController = function(deliveryService, type, types, $scope, $state, $controller, $uibModal, $anchorScroll, locationUtils, deliveryServiceService, deliveryServiceRequestService, messageModel, propertiesModel, userModel) {
 
 	// extends the FormDeliveryServiceController to inherit common methods
 	angular.extend(this, $controller('FormDeliveryServiceController', { deliveryService: deliveryService, dsCurrent: deliveryService, type: type, types: types, $scope: $scope }));
@@ -36,38 +36,120 @@ var FormEditDeliveryServiceController = function(deliveryService, type, types, $
 					return params;
 				},
 				statuses: function() {
-					return [
-						{ id: $scope.DRAFT, name: 'Save as Draft' },
-						{ id: $scope.SUBMITTED, name: 'Submit for Review and Deployment' }
+					var statuses = [
+						{ id: $scope.DRAFT, name: 'Save Request as Draft' },
+						{ id: $scope.SUBMITTED, name: 'Submit Request for Review and Deployment' }
 					];
+					if (userModel.user.roleName == propertiesModel.properties.dsRequests.roleNeededToSkip) {
+						statuses.push({ id: $scope.COMPLETE, name: 'Fulfill Request Immediately' });
+					}
+					return statuses;
 				}
 			}
 		});
 		modalInstance.result.then(function(options) {
+			var status = 'draft';
+			if (options.status.id == $scope.SUBMITTED || options.status.id == $scope.COMPLETE) {
+				status = 'submitted';
+			};
+
 			var dsRequest = {
 				changeType: 'delete',
-				status: (options.status.id == $scope.SUBMITTED) ? 'submitted' : 'draft',
+				status: status,
 				deliveryService: deliveryService
 			};
-			deliveryServiceRequestService.createDeliveryServiceRequest(dsRequest).
-				then(
-					function(response) {
-						var comment = {
-							deliveryServiceRequestId: response.id,
-							value: options.comment
-						};
-						deliveryServiceRequestService.createDeliveryServiceRequestComment(comment).
-							then(
-								function() {
+
+			// if the user chooses to complete/fulfill the delete request immediately, the ds will be deleted and behind the
+			// scenes a delivery service request will be created and marked as complete
+			if (options.status.id == $scope.COMPLETE) {
+				// first delete the ds
+				deliveryServiceService.deleteDeliveryService(deliveryService)
+					.then(
+						function() {
+							// then create the ds request
+							deliveryServiceRequestService.createDeliveryServiceRequest(dsRequest).
+								then(
+									function(response) {
+										var comment = {
+											deliveryServiceRequestId: response.id,
+											value: options.comment
+										};
+										// then create the ds request comment
+										deliveryServiceRequestService.createDeliveryServiceRequestComment(comment).
+											then(
+												function() {
+													var promises = [];
+													// assign the ds request
+													promises.push(deliveryServiceRequestService.assignDeliveryServiceRequest(response.id, userModel.user.id));
+													// set the status to 'complete'
+													promises.push(deliveryServiceRequestService.updateDeliveryServiceRequestStatus(response.id, 'complete'));
+													// and finally navigate to the /delivery-services page
+													messageModel.setMessages([ { level: 'success', text: 'Delivery service [ ' + deliveryService.xmlId + ' ] deleted' } ], true);
+													locationUtils.navigateToPath('/delivery-services');
+												}
+											);
+									}
+								);
+						},
+						function(fault) {
+							$anchorScroll(); // scrolls window to top
+							messageModel.setMessages(fault.data.alerts, false);
+						}
+					);
+
+
+
+			} else {
+				deliveryServiceRequestService.createDeliveryServiceRequest(dsRequest).
+					then(
+						function(response) {
+							var comment = {
+								deliveryServiceRequestId: response.id,
+								value: options.comment
+							};
+							deliveryServiceRequestService.createDeliveryServiceRequestComment(comment).
+								then(
+									function() {
+										messageModel.setMessages([ { level: 'success', text: 'Created request to ' + dsRequest.changeType + ' the ' + dsRequest.deliveryService.xmlId + ' delivery service' } ], true);
+										locationUtils.navigateToPath('/delivery-service-requests');
+									}
+								);
+						}
+					);
+			}
+		}, function () {
+			// do nothing
+		});
+	};
+
+	var createDeliveryServiceUpdateRequest = function(dsRequest, dsRequestComment, autoFulfilled) {
+		deliveryServiceRequestService.createDeliveryServiceRequest(dsRequest).
+			then(
+				function(response) {
+					var comment = {
+						deliveryServiceRequestId: response.id,
+						value: dsRequestComment
+					};
+					var promises = [];
+
+					deliveryServiceRequestService.createDeliveryServiceRequestComment(comment).
+						then(
+							function() {
+								if (!autoFulfilled) {
 									messageModel.setMessages([ { level: 'success', text: 'Created request to ' + dsRequest.changeType + ' the ' + dsRequest.deliveryService.xmlId + ' delivery service' } ], true);
 									locationUtils.navigateToPath('/delivery-service-requests');
 								}
-							);
+							}
+						);
+
+					if (autoFulfilled) {
+						// assign the ds request
+						promises.push(deliveryServiceRequestService.assignDeliveryServiceRequest(response.id, userModel.user.id));
+						// set the status to 'complete'
+						promises.push(deliveryServiceRequestService.updateDeliveryServiceRequestStatus(response.id, 'complete'));
 					}
-				);
-		}, function () {
-			// do nothing
-		});
+				}
+			);
 	};
 
 	$scope.deliveryServiceName = angular.copy(deliveryService.xmlId);
@@ -80,6 +162,7 @@ var FormEditDeliveryServiceController = function(deliveryService, type, types, $
 	};
 
 	$scope.save = function(deliveryService) {
+		// if ds requests are enabled in traffic_portal_properties.json, we'll create a ds request, else just update the ds
 		if ($scope.dsRequestsEnabled) {
 			var params = {
 				title: "Delivery Service Update Request",
@@ -94,35 +177,46 @@ var FormEditDeliveryServiceController = function(deliveryService, type, types, $
 						return params;
 					},
 					statuses: function() {
-						return [
-							{ id: $scope.DRAFT, name: 'Save as Draft' },
-							{ id: $scope.SUBMITTED, name: 'Submit for Review and Deployment' }
+						var statuses = [
+							{ id: $scope.DRAFT, name: 'Save Request as Draft' },
+							{ id: $scope.SUBMITTED, name: 'Submit Request for Review and Deployment' }
 						];
+						if (userModel.user.roleName == propertiesModel.properties.dsRequests.roleNeededToSkip) {
+							statuses.push({ id: $scope.COMPLETE, name: 'Fulfill Request Immediately' });
+						}
+						return statuses;
 					}
 				}
 			});
 			modalInstance.result.then(function(options) {
+				var status = 'draft';
+				if (options.status.id == $scope.SUBMITTED || options.status.id == $scope.COMPLETE) {
+					status = 'submitted';
+				};
 				var dsRequest = {
 					changeType: 'update',
-					status: (options.status.id == $scope.SUBMITTED) ? 'submitted' : 'draft',
+					status: status,
 					deliveryService: deliveryService
 				};
-				deliveryServiceRequestService.createDeliveryServiceRequest(dsRequest).
-					then(
-						function(response) {
-							var comment = {
-								deliveryServiceRequestId: response.id,
-								value: options.comment
-							};
-							deliveryServiceRequestService.createDeliveryServiceRequestComment(comment).
-								then(
-									function() {
-										messageModel.setMessages([ { level: 'success', text: 'Created request to ' + dsRequest.changeType + ' the ' + dsRequest.deliveryService.xmlId + ' delivery service' } ], true);
-										locationUtils.navigateToPath('/delivery-service-requests');
-									}
-								);
-						}
-					);
+				// if the user chooses to complete/fulfill the update request immediately, the ds will be updated and behind the
+				// scenes a delivery service request will be created and marked as complete
+				if (options.status.id == $scope.COMPLETE) {
+					deliveryServiceService.updateDeliveryService(deliveryService).
+						then(
+							function() {
+								$state.reload(); // reloads all the resolves for the view
+								messageModel.setMessages([ { level: 'success', text: 'Delivery Service [ ' + deliveryService.xmlId + ' ] updated' } ], false);
+								createDeliveryServiceUpdateRequest(dsRequest, options.comment, true);
+							},
+							function(fault) {
+								$anchorScroll(); // scrolls window to top
+								messageModel.setMessages(fault.data.alerts, false);
+							}
+						);
+				} else {
+					createDeliveryServiceUpdateRequest(dsRequest, options.comment, false);
+				}
+
 			}, function () {
 				// do nothing
 			});
@@ -142,24 +236,24 @@ var FormEditDeliveryServiceController = function(deliveryService, type, types, $
 	};
 
 	$scope.confirmDelete = function(deliveryService) {
-		if ($scope.dsRequestsEnabled) {
-			createDeliveryServiceDeleteRequest(deliveryService);
-		} else {
-			var params = {
-				title: 'Delete Delivery Service: ' + deliveryService.xmlId,
-				key: deliveryService.xmlId
-			};
-			var modalInstance = $uibModal.open({
-				templateUrl: 'common/modules/dialog/delete/dialog.delete.tpl.html',
-				controller: 'DialogDeleteController',
-				size: 'md',
-				resolve: {
-					params: function () {
-						return params;
-					}
+		var params = {
+			title: 'Delete Delivery Service: ' + deliveryService.xmlId,
+			key: deliveryService.xmlId
+		};
+		var modalInstance = $uibModal.open({
+			templateUrl: 'common/modules/dialog/delete/dialog.delete.tpl.html',
+			controller: 'DialogDeleteController',
+			size: 'md',
+			resolve: {
+				params: function () {
+					return params;
 				}
-			});
-			modalInstance.result.then(function() {
+			}
+		});
+		modalInstance.result.then(function() {
+			if ($scope.dsRequestsEnabled) {
+				createDeliveryServiceDeleteRequest(deliveryService);
+			} else {
 				deliveryServiceService.deleteDeliveryService(deliveryService)
 					.then(
 						function() {
@@ -171,14 +265,13 @@ var FormEditDeliveryServiceController = function(deliveryService, type, types, $
 							messageModel.setMessages(fault.data.alerts, false);
 						}
 					);
-			}, function () {
-				// do nothing
-			});
-		}
-
+			}
+		}, function () {
+			// do nothing
+		});
 	};
 
 };
 
-FormEditDeliveryServiceController.$inject = ['deliveryService', 'type', 'types', '$scope', '$state', '$controller', '$uibModal', '$anchorScroll', 'locationUtils', 'deliveryServiceService', 'deliveryServiceRequestService', 'messageModel'];
+FormEditDeliveryServiceController.$inject = ['deliveryService', 'type', 'types', '$scope', '$state', '$controller', '$uibModal', '$anchorScroll', 'locationUtils', 'deliveryServiceService', 'deliveryServiceRequestService', 'messageModel', 'propertiesModel', 'userModel'];
 module.exports = FormEditDeliveryServiceController;
diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/new/FormNewDeliveryServiceController.js b/traffic_portal/app/src/common/modules/form/deliveryService/new/FormNewDeliveryServiceController.js
index 00fd8a6..acd9133 100644
--- a/traffic_portal/app/src/common/modules/form/deliveryService/new/FormNewDeliveryServiceController.js
+++ b/traffic_portal/app/src/common/modules/form/deliveryService/new/FormNewDeliveryServiceController.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-var FormNewDeliveryServiceController = function(deliveryService, type, types, $scope, $controller, $uibModal, $anchorScroll, locationUtils, deliveryServiceService, deliveryServiceRequestService, messageModel) {
+var FormNewDeliveryServiceController = function(deliveryService, type, types, $scope, $controller, $uibModal, $anchorScroll, locationUtils, deliveryServiceService, deliveryServiceRequestService, messageModel, propertiesModel, userModel) {
 
 	// extends the FormDeliveryServiceController to inherit common methods
 	angular.extend(this, $controller('FormDeliveryServiceController', { deliveryService: deliveryService, dsCurrent: deliveryService, type: type, types: types, $scope: $scope }));
@@ -30,7 +30,39 @@ var FormNewDeliveryServiceController = function(deliveryService, type, types, $s
 		saveLabel: 'Create'
 	};
 
+	var createDeliveryServiceCreateRequest = function(dsRequest, dsRequestComment, autoFulfilled) {
+		deliveryServiceRequestService.createDeliveryServiceRequest(dsRequest).
+			then(
+				function(response) {
+					var comment = {
+						deliveryServiceRequestId: response.id,
+						value: dsRequestComment
+					};
+					var promises = [];
+
+					deliveryServiceRequestService.createDeliveryServiceRequestComment(comment).
+						then(
+							function() {
+								if (!autoFulfilled) {
+									messageModel.setMessages([ { level: 'success', text: 'Created request to ' + dsRequest.changeType + ' the ' + dsRequest.deliveryService.xmlId + ' delivery service' } ], true);
+									locationUtils.navigateToPath('/delivery-service-requests');
+								}
+							}
+						);
+
+					if (autoFulfilled) {
+						// assign the ds request
+						promises.push(deliveryServiceRequestService.assignDeliveryServiceRequest(response.id, userModel.user.id));
+						// set the status to 'complete'
+						promises.push(deliveryServiceRequestService.updateDeliveryServiceRequestStatus(response.id, 'complete'));
+					}
+				}
+			);
+	};
+
+
 	$scope.save = function(deliveryService) {
+		// if ds requests are enabled in traffic_portal_properties.json, we'll create a ds request, else just create the ds
 		if ($scope.dsRequestsEnabled) {
 			var params = {
 				title: "Delivery Service Create Request",
@@ -45,35 +77,47 @@ var FormNewDeliveryServiceController = function(deliveryService, type, types, $s
 						return params;
 					},
 					statuses: function() {
-						return [
-							{ id: $scope.DRAFT, name: 'Save as Draft' },
-							{ id: $scope.SUBMITTED, name: 'Submit for Review and Deployment' }
+						var statuses = [
+							{ id: $scope.DRAFT, name: 'Save Request as Draft' },
+							{ id: $scope.SUBMITTED, name: 'Submit Request for Review and Deployment' }
 						];
+						if (userModel.user.roleName == propertiesModel.properties.dsRequests.roleNeededToSkip) {
+							statuses.push({ id: $scope.COMPLETE, name: 'Fulfill Request Immediately' });
+						}
+						return statuses;
 					}
 				}
 			});
 			modalInstance.result.then(function(options) {
+				var status = 'draft';
+				if (options.status.id == $scope.SUBMITTED || options.status.id == $scope.COMPLETE) {
+					status = 'submitted';
+				};
 				var dsRequest = {
 					changeType: 'create',
-					status: (options.status.id == $scope.SUBMITTED) ? 'submitted' : 'draft',
+					status: status,
 					deliveryService: deliveryService
 				};
-				deliveryServiceRequestService.createDeliveryServiceRequest(dsRequest).
-					then(
-						function(response) {
-							var comment = {
-								deliveryServiceRequestId: response.id,
-								value: options.comment
-							};
-							deliveryServiceRequestService.createDeliveryServiceRequestComment(comment).
-							then(
-								function() {
-									messageModel.setMessages([ { level: 'success', text: 'Created request to ' + dsRequest.changeType + ' the ' + dsRequest.deliveryService.xmlId + ' delivery service' } ], true);
-									locationUtils.navigateToPath('/delivery-service-requests');
-								}
-							);
-						}
-					);
+				// if the user chooses to complete/fulfill the create request immediately, the ds will be created and behind the
+				// scenes a delivery service request will be created and marked as complete
+				if (options.status.id == $scope.COMPLETE) {
+					deliveryServiceService.createDeliveryService(deliveryService).
+						then(
+							function(result) {
+								createDeliveryServiceCreateRequest(dsRequest, options.comment, true);
+								messageModel.setMessages([ { level: 'success', text: 'Delivery Service [ ' + deliveryService.xmlId + ' ] created' } ], true);
+								locationUtils.navigateToPath('/delivery-services/' + result.data.response[0].id + '?type=' + result.data.response[0].type);
+							},
+							function(fault) {
+								$anchorScroll(); // scrolls window to top
+								messageModel.setMessages(fault.data.alerts, false);
+							}
+						);
+
+				} else {
+					createDeliveryServiceCreateRequest(dsRequest, options.comment, false);
+				}
+
 			}, function () {
 				// do nothing
 			});
@@ -94,5 +138,5 @@ var FormNewDeliveryServiceController = function(deliveryService, type, types, $s
 
 };
 
-FormNewDeliveryServiceController.$inject = ['deliveryService', 'type', 'types', '$scope', '$controller', '$uibModal', '$anchorScroll', 'locationUtils', 'deliveryServiceService', 'deliveryServiceRequestService', 'messageModel'];
+FormNewDeliveryServiceController.$inject = ['deliveryService', 'type', 'types', '$scope', '$controller', '$uibModal', '$anchorScroll', 'locationUtils', 'deliveryServiceService', 'deliveryServiceRequestService', 'messageModel', 'propertiesModel', 'userModel'];
 module.exports = FormNewDeliveryServiceController;
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceRequests/TableDeliveryServiceRequestsController.js b/traffic_portal/app/src/common/modules/table/deliveryServiceRequests/TableDeliveryServiceRequestsController.js
index ac6a902..6aa39b0 100644
--- a/traffic_portal/app/src/common/modules/table/deliveryServiceRequests/TableDeliveryServiceRequestsController.js
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceRequests/TableDeliveryServiceRequestsController.js
@@ -19,54 +19,6 @@
 
 var TableDeliveryServicesRequestsController = function(dsRequests, $scope, $state, $uibModal, $anchorScroll, $q, $location, dateUtils, locationUtils, typeService, deliveryServiceService, deliveryServiceRequestService, messageModel, userModel) {
 
-	var createDeliveryServiceDeleteRequest = function(deliveryService) {
-		var params = {
-			title: "Delivery Service Delete Request",
-			message: 'All delivery service deletions must be reviewed.'
-		};
-		var modalInstance = $uibModal.open({
-			templateUrl: 'common/modules/dialog/deliveryServiceRequest/dialog.deliveryServiceRequest.tpl.html',
-			controller: 'DialogDeliveryServiceRequestController',
-			size: 'md',
-			resolve: {
-				params: function () {
-					return params;
-				},
-				statuses: function() {
-					return [
-						{ id: $scope.DRAFT, name: 'Save as Draft' },
-						{ id: $scope.SUBMITTED, name: 'Submit for Review and Deployment' }
-					];
-				}
-			}
-		});
-		modalInstance.result.then(function(options) {
-			var dsRequest = {
-				changeType: 'delete',
-				status: (options.status.id == $scope.SUBMITTED) ? 'submitted' : 'draft',
-				deliveryService: deliveryService
-			};
-			deliveryServiceRequestService.createDeliveryServiceRequest(dsRequest).
-				then(
-					function(response) {
-						var comment = {
-							deliveryServiceRequestId: response.id,
-							value: options.comment
-						};
-						deliveryServiceRequestService.createDeliveryServiceRequestComment(comment).
-							then(
-								function() {
-									messageModel.setMessages([ { level: 'success', text: 'Created request to ' + dsRequest.changeType + ' the ' + dsRequest.deliveryService.xmlId + ' delivery service' } ], false);
-									$scope.refresh();
-								}
-							);
-					}
-				);
-		}, function () {
-			// do nothing
-		});
-	};
-
 	var createComment = function(request, placeholder) {
 		var params = {
 			title: 'Add Comment',
@@ -128,34 +80,6 @@ var TableDeliveryServicesRequestsController = function(dsRequests, $scope, $stat
 		return (request.status == 'rejected' || request.status == 'complete');
 	};
 
-	$scope.compareRequests = function() {
-		var params = {
-			title: 'Compare Delivery Service Requests',
-			message: "Please select 2 delivery service requests to compare",
-			labelFunction: function (item) {
-				return item['deliveryService']['xmlId'] + ' ' + item['changeType'] + ' (' + item['author'] + ' created on ' + item['createdAt'] + ')'
-			}
-		};
-		var modalInstance = $uibModal.open({
-			templateUrl: 'common/modules/dialog/compare/dialog.compare.tpl.html',
-			controller: 'DialogCompareController',
-			size: 'lg',
-			resolve: {
-				params: function () {
-					return params;
-				},
-				collection: function(deliveryServiceRequestService) {
-					return deliveryServiceRequestService.getDeliveryServiceRequests();
-				}
-			}
-		});
-		modalInstance.result.then(function(requests) {
-			$location.path($location.path() + '/compare/' + requests[0].id + '/' + requests[1].id);
-		}, function () {
-			// do nothing
-		});
-	};
-
 	$scope.assignRequest = function(request, assign, $event) {
 		$event.stopPropagation(); // this kills the click event so it doesn't trigger anything else
 		var params = {
@@ -317,126 +241,6 @@ var TableDeliveryServicesRequestsController = function(dsRequests, $scope, $stat
 		});
 	};
 
-	$scope.createRequest = function() {
-		var CREATE = 1,
-			UPDATE = 2,
-			DELETE = 3;
-
-		var params = {
-			title: 'Create Delivery Service Request',
-			message: 'What kind of delivery service request would you like to create?'
-		};
-		var modalInstance = $uibModal.open({
-			templateUrl: 'common/modules/dialog/select/dialog.select.tpl.html',
-			controller: 'DialogSelectController',
-			size: 'md',
-			resolve: {
-				params: function () {
-					return params;
-				},
-				collection: function() {
-					return [
-						{ id: CREATE, name: 'A request for a new delivery service' },
-						{ id: UPDATE, name: 'A request to update an existing delivery service' },
-						{ id: DELETE, name: 'A request to delete an existing delivery service' }
-					];
-				}
-			}
-		});
-		modalInstance.result.then(function(action) {
-			var params,
-				modalInstance;
-
-			if (action.id == CREATE) {
-				params = {
-					title: 'Create Delivery Service',
-					message: "Please select a content routing category"
-				};
-				modalInstance = $uibModal.open({
-					templateUrl: 'common/modules/dialog/select/dialog.select.tpl.html',
-					controller: 'DialogSelectController',
-					size: 'md',
-					resolve: {
-						params: function () {
-							return params;
-						},
-						collection: function() {
-							// the following represent the 4 categories of delivery services
-							// the ids are arbitrary but the dialog.select dropdown needs them
-							return [
-								{ id: 1, name: 'ANY_MAP' },
-								{ id: 2, name: 'DNS' },
-								{ id: 3, name: 'HTTP' },
-								{ id: 4, name: 'STEERING' }
-							];
-						}
-					}
-				});
-				modalInstance.result.then(function(type) {
-					var path = '/delivery-services/new?type=' + type.name;
-					locationUtils.navigateToPath(path);
-				}, function () {
-					// do nothing on cancel
-				});
-			} else if (action.id == UPDATE) {
-				params = {
-					title: 'Update Delivery Service',
-					message: "Please select a delivery service to update",
-					labelFunction: function (item) {
-						return item['xmlId']
-					}
-				};
-				modalInstance = $uibModal.open({
-					templateUrl: 'common/modules/dialog/select/dialog.select.tpl.html',
-					controller: 'DialogSelectController',
-					size: 'md',
-					resolve: {
-						params: function () {
-							return params;
-						},
-						collection: function (deliveryServiceService) {
-							return deliveryServiceService.getDeliveryServices();
-						}
-					}
-				});
-				modalInstance.result.then(function (ds) {
-					locationUtils.navigateToPath('/delivery-services/' + ds.id + '?type=' + ds.type);
-				}, function () {
-					// do nothing on cancel
-				});
-			} else if (action.id == DELETE) {
-				params = {
-					title: 'Delete Delivery Service',
-					message: "Please select a delivery service to delete",
-					labelFunction: function (item) {
-						return item['xmlId']
-					}
-				};
-				modalInstance = $uibModal.open({
-					templateUrl: 'common/modules/dialog/select/dialog.select.tpl.html',
-					controller: 'DialogSelectController',
-					size: 'md',
-					resolve: {
-						params: function () {
-							return params;
-						},
-						collection: function(deliveryServiceService) {
-							return deliveryServiceService.getDeliveryServices();
-						}
-					}
-				});
-				modalInstance.result.then(function(ds) {
-					createDeliveryServiceDeleteRequest(ds);
-				}, function () {
-					// do nothing on cancel
-				});
-			}
-
-		}, function () {
-			// do nothing on cancel
-		});
-	};
-
 	$scope.editDeliveryServiceRequest = function(request) {
 		var path = '/delivery-service-requests/' + request.id + '?type=';
 		typeService.getType(request.deliveryService.typeId)
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceRequests/table.deliveryServiceRequests.tpl.html b/traffic_portal/app/src/common/modules/table/deliveryServiceRequests/table.deliveryServiceRequests.tpl.html
index 2ce315b..775e756 100644
--- a/traffic_portal/app/src/common/modules/table/deliveryServiceRequests/table.deliveryServiceRequests.tpl.html
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceRequests/table.deliveryServiceRequests.tpl.html
@@ -23,17 +23,7 @@ under the License.
             <li class="active">Delivery Service Requests</li>
         </ol>
         <div class="pull-right" role="group">
-            <button class="btn btn-primary" title="Create Delivery Service Request" ng-click="createRequest()"><i class="fa fa-plus"></i></button>
             <button class="btn btn-default" title="Refresh" ng-click="refresh()"><i class="fa fa-refresh"></i></button>
-            <div class="btn-group" role="group" uib-dropdown is-open="more.isopen">
-                <button type="button" class="btn btn-default dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
-                    More
-                    <span class="caret"></span>
-                </button>
-                <ul class="dropdown-menu-right dropdown-menu" uib-dropdown-menu>
-                    <li role="menuitem"><a ng-click="compareRequests()">Compare Delivery Service Requests</a></li>
-                </ul>
-            </div>
         </div>
         <div class="clearfix"></div>
     </div>
diff --git a/traffic_portal/app/src/traffic_portal_properties.json b/traffic_portal/app/src/traffic_portal_properties.json
index a50a78d..fe30dc7 100644
--- a/traffic_portal/app/src/traffic_portal_properties.json
+++ b/traffic_portal/app/src/traffic_portal_properties.json
@@ -39,8 +39,9 @@
       }
     },
     "dsRequests": {
-      "_comments": "Should all delivery service changes go through the delivery service review process?",
-      "enabled": false
+      "_comments": "Should all delivery service changes go through the delivery service review process? You can also provide a role that will skip the process.",
+      "enabled": false,
+      "roleNeededToSkip": "admin"
     },
     "cacheChecks": {
       "_comments": "These are configurable properties for the cache checks view. The data for the cache checks view is derived from TO extensions. The extensions array should include an entry for each of your extensions or you can check GET api/1.3/servers/checks to see which checks you have configured.",

-- 
To stop receiving notification emails like this one, please contact
dangogh@apache.org.