Add optional SSO to install dialog

This commit is contained in:
Girish Ramakrishnan
2016-11-11 21:57:39 +05:30
parent 2ecf0c32cb
commit 2065a5f7f2
2 changed files with 11 additions and 1 deletions
+5 -1
View File
@@ -38,6 +38,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
accessRestriction: { users: [], groups: [] },
accessRestrictionSingleUser: null,
needsOAuthProxy: false,
optionalSso: false,
isAccessRestrictionValid: function () {
var tmp = $scope.appInstall.accessRestriction;
@@ -67,6 +68,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.appInstall.accessRestriction = { users: [], groups: [] };
$scope.appInstall.accessRestrictionSingleUser = null;
$scope.appInstall.needsOAuthProxy = false;
$scope.appInstall.optionalSso = false;
$('#collapseInstallForm').collapse('hide');
$('#collapseResourceConstraint').collapse('hide');
@@ -110,6 +112,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
var manifest = app.manifest;
$scope.appInstall.needsOAuthProxy = !(manifest.addons['ldap'] || manifest.addons['oauth'] || manifest.addons['simpleauth'] || manifest.addons['email'] || manifest.customAuth);
$scope.appInstall.optionalSso = !!manifest.optionalSso;
$scope.appInstall.accessRestrictionOption = 'any';
// set default ports
@@ -146,7 +149,8 @@ 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.app.manifest.singleUser || $scope.appInstall.accessRestrictionOption !== 'unrestricted'),
sso: $scope.appInstall.optionalSso && $scope.appInstall.accessRestriction == 'nosso'
};
Client.installApp($scope.appInstall.app.id, $scope.appInstall.app.manifest, $scope.appInstall.app.title, data, function (error) {