diff --git a/src/views/apps.js b/src/views/apps.js index bc5f8555c..7a1f5eab8 100644 --- a/src/views/apps.js +++ b/src/views/apps.js @@ -49,7 +49,11 @@ angular.module('Application').controller('AppsController', ['$scope', '$location // fill relevant info from the app $scope.appConfigure.app = app; - $scope.appConfigure.location = app.location; + if ($scope.user.admin) { + $scope.appConfigure.location = app.location; + } else { // strip the trailing username + $scope.appConfigure.location = app.location === $scope.user.username ? '' : app.location.replace(new RegExp('-' + $scope.user.username + '$'),''); + } $scope.appConfigure.domain = $scope.domains.filter(function (d) { return d.domain === app.domain; })[0]; $scope.appConfigure.portBindingsInfo = angular.extend({}, app.manifest.tcpPorts, app.manifest.udpPorts); // Portbinding map only for information $scope.appConfigure.memoryLimit = app.memoryLimit || app.manifest.memoryLimit || (256 * 1024 * 1024); @@ -233,7 +237,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location }); } - // reflect the new app state immediately + // reflect the new app state immediately Client.refreshAppCache($scope.appRestore.app.id, waitForBackupFinish); }); },