Allow to specify upstreamUri for proxy app during installation

This commit is contained in:
Johannes Zellner
2022-06-09 14:21:50 +02:00
parent 39a3d8d0cb
commit 6bcf6aae28
3 changed files with 17 additions and 2 deletions
+5
View File
@@ -84,6 +84,11 @@
</ng-form>
</div>
<div class="form-group" ng-show="isProxyApp(appInstall.app)">
<label class="control-label" for="appInstallUpstreamUriInput">Upstream URI</label>
<input type="text" class="form-control" ng-model="appInstall.upstreamUri" id="appInstallUpstreamUriInput" name="upstreamUri" ng-required="isProxyApp(appInstall.app)">
</div>
<div class="form-group" ng-show="appInstall.app.manifest.addons.email">
<label class="control-label">{{ 'appstore.installDialog.userManagement' | tr }}</label>
<p>{{ 'appstore.installDialog.userManagementMailbox' | tr }}
+10 -1
View File
@@ -88,6 +88,12 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
return categoryLabel;
};
$scope.isProxyApp = function (app) {
if (!app) return false;
return app.id === 'io.cloudron.builtin.appproxy';
};
$scope.userManagementFilterOptions = [
{ id: '', icon: '', label: $translate.instant('appstore.ssofilter.all') },
{ id: 'sso', icon: 'fas fa-user', label: $translate.instant('apps.auth.sso') },
@@ -124,6 +130,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
customAuth: false,
optionalSso: false,
subscriptionErrorMesssage: '',
upstreamUri: '',
isAccessRestrictionValid: function () {
var tmp = $scope.appInstall.accessRestriction;
@@ -149,6 +156,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
$scope.appInstall.optionalSso = false;
$scope.appInstall.customAuth = false;
$scope.appInstall.subscriptionErrorMesssage = '';
$scope.appInstall.upstreamUri = '';
$('#collapseInstallForm').collapse('hide');
$('#collapseResourceConstraint').collapse('hide');
@@ -266,7 +274,8 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
accessRestriction: finalAccessRestriction,
cert: $scope.appInstall.certificateFile,
key: $scope.appInstall.keyFile,
sso: !$scope.appInstall.optionalSso ? undefined : ($scope.appInstall.accessRestrictionOption !== 'nosso')
sso: !$scope.appInstall.optionalSso ? undefined : ($scope.appInstall.accessRestrictionOption !== 'nosso'),
upstreamUri: $scope.appInstall.upstreamUri
};
var domains = [];