spaces: use edition instead of setting

This commit is contained in:
Girish Ramakrishnan
2018-08-28 18:55:13 -07:00
parent dd53d0d575
commit d316d216db
7 changed files with 10 additions and 74 deletions

View File

@@ -52,7 +52,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.appConfigure.app = app;
if ($scope.user.admin) {
$scope.appConfigure.location = app.location;
} else { // strip the trailing username
} else { // strip the trailing username in spaces mode
$scope.appConfigure.location = app.location === $scope.spacesSuffix ? '' : app.location.replace(new RegExp('-' + $scope.spacesSuffix + '$'),'');
}
$scope.appConfigure.domain = $scope.domains.filter(function (d) { return d.domain === app.domain; })[0];
@@ -604,7 +604,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.spacesSuffix = $scope.user.username.replace(/\./g, '-');
if ($scope.user.admin || $scope.config.spaces.enabled) {
if ($scope.user.admin || $scope.config.spaces) {
fetchUsers();
fetchGroups();
getDomains();