remove singleUser from ui code

This commit is contained in:
Girish Ramakrishnan
2016-11-11 22:12:48 +05:30
parent 2065a5f7f2
commit 72f31744e3
3 changed files with 4 additions and 22 deletions

View File

@@ -36,7 +36,6 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
keyFileName: '',
accessRestrictionOption: 'any',
accessRestriction: { users: [], groups: [] },
accessRestrictionSingleUser: null,
needsOAuthProxy: false,
optionalSso: false,
@@ -66,7 +65,6 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.appInstall.keyFileName = '';
$scope.appInstall.accessRestrictionOption = 'any';
$scope.appInstall.accessRestriction = { users: [], groups: [] };
$scope.appInstall.accessRestrictionSingleUser = null;
$scope.appInstall.needsOAuthProxy = false;
$scope.appInstall.optionalSso = false;
@@ -108,7 +106,6 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.appInstall.portBindingsEnabled = {}; // This is the actual model holding the enabled/disabled flag
$scope.appInstall.accessRestrictionOption = app.accessRestriction ? 'groups' : 'any';
$scope.appInstall.accessRestriction = app.accessRestriction || { users: [], groups: [] };
$scope.appInstall.accessRestrictionSingleUser = null;
var manifest = app.manifest;
$scope.appInstall.needsOAuthProxy = !(manifest.addons['ldap'] || manifest.addons['oauth'] || manifest.addons['simpleauth'] || manifest.addons['email'] || manifest.customAuth);
@@ -139,9 +136,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
}
// translate to accessRestriction object
var accessRestriction = $scope.appInstall.app.manifest.singleUser ? {
users: [ $scope.appInstall.accessRestrictionSingleUser.id ]
} : ($scope.appInstall.accessRestrictionOption === 'groups' ? $scope.appInstall.accessRestriction : null);
var accessRestriction = $scope.appInstall.accessRestrictionOption === 'groups' ? $scope.appInstall.accessRestriction : null;
var data = {
location: $scope.appInstall.location || '',
@@ -149,7 +144,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
accessRestriction: accessRestriction,
cert: $scope.appInstall.certificateFile,
key: $scope.appInstall.keyFile,
oauthProxy: $scope.appInstall.needsOAuthProxy && ($scope.appInstall.app.manifest.singleUser || $scope.appInstall.accessRestrictionOption !== 'unrestricted'),
oauthProxy: $scope.appInstall.needsOAuthProxy && $scope.appInstall.accessRestrictionOption !== 'unrestricted',
sso: $scope.appInstall.optionalSso && $scope.appInstall.accessRestriction == 'nosso'
};