Skip to content

Commit

Permalink
#47 Product Lightbox - security error on line item edit
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasmussen451 committed May 4, 2016
1 parent 5f3d3fa commit f1ea081
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Product Lightbox/productLightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ function productlightbox() {
}
}

LightboxCtrl.$inject = ['$scope', 'Lightbox'];
function LightboxCtrl($scope, Lightbox) {
LightboxCtrl.$inject = ['$scope', 'Lightbox', 'Security'];
function LightboxCtrl($scope, Lightbox, Security) {
function LightboxImageScope($scope) {
if ($scope.LineItem.Specs && $scope.LineItem.Specs.Color) {
var varSpecName = "Color";
Expand All @@ -77,7 +77,10 @@ function LightboxCtrl($scope, Lightbox) {
angular.forEach($scope.LineItem.Product.StaticSpecGroups[specGroupName].Specs, function (staticSpecs) {
var image = {};
image.Number = count;
image.url = staticSpecs.FileURL;
if (image.path && image.path.indexOf('auth') == -1) {
image.url = image.path + "&auth=" + Security.auth();
}
else { image.url = image.path; }
image.Selected = false;
image.Name = staticSpecs.Name;
var staticSpec = staticSpecs.Name; // this assumes that the name will match the variable spec value
Expand Down

0 comments on commit f1ea081

Please sign in to comment.