Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
fix: removes rootScope guest mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug-Reed committed May 7, 2018
1 parent f45f2e5 commit 00c47e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/src/main/webapp/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ require(['./config', './js/login-config'], function(config, loginConfig) {
$sessionStorage.portal.lastAccessed = (new Date).getTime();
$sessionStorage.portal.username = response.data.username;
if (response.data.username === 'guest') {
$rootScope.GuestMode = true;
$sessionStorage.GuestMode = true;
}
// for some really weird reason the $sessionStorage here isn't being
// persisted to real session storage, so we have to do it manually.
Expand Down
4 changes: 2 additions & 2 deletions web/src/main/webapp/my-app/marketplace/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ define(['angular', 'jquery', 'require'], function(angular, $, require) {

$scope.getLaunchURL = function(marketplaceEntry) {
var layoutObj = marketplaceEntry.layoutObject;
if ($rootScope.GuestMode && !marketplaceEntry.hasInLayout) {
if ($sessionStorage.GuestMode && !marketplaceEntry.hasInLayout) {
return $scope.loginToAuthPage +
'/web/apps/details/'+ marketplaceEntry.fname;
} else if (layoutObj.altMaxUrl == false &&
Expand Down Expand Up @@ -244,7 +244,7 @@ define(['angular', 'jquery', 'require'], function(angular, $, require) {
// initialize variables

$scope.searchResultLimit = 20;
$scope.showAll = $rootScope.GuestMode || false;
$scope.showAll = $scope.GuestMode || false;
if (currentPage === 'details') {
// Empty string indicates no categories, show all portlets
$scope.categoryToShow = '';
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/my-app/search/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ define([
$scope.googleResultsEstimatedCount = 0;
$scope.googleEmptyResults = false;
$scope.searchResultLimit = 20;
$scope.showAll = $rootScope.GuestMode || false;
$scope.showAll = $scope.GuestMode || false;
base.setupSearchTerm();
// in case the search field is not set for whatever reason, reset it
PortalSearchService.setQuery($scope.searchTerm);
Expand Down

0 comments on commit 00c47e2

Please sign in to comment.