}])
.controller('SearchCtrl',
- ['$scope','$routeParams','egAuth','egNet','egIDL','bucketSvc',
-function($scope, $routeParams, egAuth, egNet, egIDL, bucketSvc) {
+ ['$scope','$routeParams','egAuth','egNet','bucketSvc',
+function($scope, $routeParams, egAuth, egNet, bucketSvc) {
$scope.setTab('search');
$scope.focusMe = true;
}
// fetch the bucket; on error show the not-allowed message
- drawBucket()['catch'](function() { $scope.forbidden = true });
+ if ($scope.bucketId)
+ drawBucket()['catch'](function() { $scope.forbidden = true });
}])