remove oauth proxy from ui code

This commit is contained in:
Girish Ramakrishnan
2016-11-11 22:30:18 +05:30
parent f5ebb782c0
commit b23c06d443
5 changed files with 4 additions and 31 deletions

View File

@@ -83,12 +83,6 @@
<div class="form-group" ng-hide="appConfigure.app.manifest.customAuth || appConfigure.app.manifest.addons.email">
<label class="control-label">Access control</label>
<div class="radio" ng-show="appConfigure.needsOAuthProxy">
<label>
<input type="radio" ng-model="appConfigure.accessRestrictionOption" value="unrestricted">
Unrestricted
</label>
</div>
<div class="radio">
<label>
<input type="radio" ng-model="appConfigure.accessRestrictionOption" value="any">

View File

@@ -31,7 +31,6 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
accessRestrictionOption: 'any',
accessRestriction: { users: [], groups: [] },
xFrameOptions: '',
needsOAuthProxy: false,
isAccessRestrictionValid: function () {
var tmp = $scope.appConfigure.accessRestriction;
@@ -95,7 +94,6 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.appConfigure.accessRestrictionOption = 'any';
$scope.appConfigure.accessRestriction = { users: [], groups: [] };
$scope.appConfigure.xFrameOptions = '';
$scope.appConfigure.needsOAuthProxy = false;
$scope.appConfigureForm.$setPristine();
$scope.appConfigureForm.$setUntouched();
@@ -198,13 +196,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.appConfigure.memoryTicks.unshift(app.manifest.memoryLimit);
}
var manifest = app.manifest;
$scope.appConfigure.needsOAuthProxy = !(manifest.addons['ldap'] || manifest.addons['oauth'] || manifest.addons['simpleauth'] || manifest.addons['email'] || manifest.customAuth);
if ($scope.appConfigure.needsOAuthProxy && !app.oauthProxy) {
$scope.appConfigure.accessRestrictionOption = 'unrestricted';
} else {
$scope.appConfigure.accessRestrictionOption = app.accessRestriction ? 'groups' : 'any';
}
$scope.appConfigure.accessRestrictionOption = app.accessRestriction ? 'groups' : 'any';
// fill the portBinding structures. There might be holes in the app.portBindings, which signalizes a disabled port
for (var env in $scope.appConfigure.portBindingsInfo) {
@@ -243,8 +235,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
cert: $scope.appConfigure.certificateFile,
key: $scope.appConfigure.keyFile,
xFrameOptions: $scope.appConfigure.xFrameOptions ? ('ALLOW-FROM ' + $scope.appConfigure.xFrameOptions) : 'SAMEORIGIN',
memoryLimit: $scope.appConfigure.memoryLimit === $scope.appConfigure.memoryTicks[0] ? 0 : $scope.appConfigure.memoryLimit,
oauthProxy: $scope.appConfigure.needsOAuthProxy && $scope.appConfigure.accessRestrictionOption !== 'unrestricted'
memoryLimit: $scope.appConfigure.memoryLimit === $scope.appConfigure.memoryTicks[0] ? 0 : $scope.appConfigure.memoryLimit
};
Client.configureApp($scope.appConfigure.app.id, $scope.appConfigure.password, data, function (error) {

View File

@@ -73,12 +73,6 @@
</span>
</div>
</div>
<div class="radio" ng-show="appInstall.needsOAuthProxy">
<label>
<input type="radio" ng-model="appInstall.accessRestrictionOption" value="unrestricted">
Unrestricted
</label>
</div>
<div class="radio" ng-show="appInstall.optionalSso">
<label>
<input type="radio" ng-model="appInstall.accessRestrictionOption" value="nosso">

View File

@@ -36,7 +36,6 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
keyFileName: '',
accessRestrictionOption: 'any',
accessRestriction: { users: [], groups: [] },
needsOAuthProxy: false,
optionalSso: false,
isAccessRestrictionValid: function () {
@@ -65,7 +64,6 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.appInstall.keyFileName = '';
$scope.appInstall.accessRestrictionOption = 'any';
$scope.appInstall.accessRestriction = { users: [], groups: [] };
$scope.appInstall.needsOAuthProxy = false;
$scope.appInstall.optionalSso = false;
$('#collapseInstallForm').collapse('hide');
@@ -108,7 +106,6 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.appInstall.accessRestriction = app.accessRestriction || { users: [], groups: [] };
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';
@@ -144,7 +141,6 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
accessRestriction: accessRestriction,
cert: $scope.appInstall.certificateFile,
key: $scope.appInstall.keyFile,
oauthProxy: $scope.appInstall.needsOAuthProxy && $scope.appInstall.accessRestrictionOption !== 'unrestricted',
sso: $scope.appInstall.optionalSso && $scope.appInstall.accessRestriction == 'nosso'
};