derive customAuth from usage of auth addon
we can get rid of this value from the manifest since the oauth proxy is going away.
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="form-group" ng-show="appConfigure.app.manifest.customAuth">
|
||||
<div class="form-group" ng-show="appConfigure.customAuth">
|
||||
<label class="control-label">Access control</label>
|
||||
<p>
|
||||
This app has it's own access control and does not integrate with Cloudron Auth.
|
||||
@@ -81,7 +81,7 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-hide="appConfigure.app.manifest.customAuth || appConfigure.app.manifest.addons.email">
|
||||
<div class="form-group" ng-hide="appConfigure.customAuth || appConfigure.app.manifest.addons.email">
|
||||
<label class="control-label">Access control</label>
|
||||
<div class="radio">
|
||||
<label>
|
||||
|
||||
@@ -31,6 +31,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
accessRestrictionOption: 'any',
|
||||
accessRestriction: { users: [], groups: [] },
|
||||
xFrameOptions: '',
|
||||
customAuth: false,
|
||||
|
||||
isAccessRestrictionValid: function () {
|
||||
var tmp = $scope.appConfigure.accessRestriction;
|
||||
@@ -94,6 +95,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
$scope.appConfigure.accessRestrictionOption = 'any';
|
||||
$scope.appConfigure.accessRestriction = { users: [], groups: [] };
|
||||
$scope.appConfigure.xFrameOptions = '';
|
||||
$scope.appConfigure.customAuth = false;
|
||||
|
||||
$scope.appConfigureForm.$setPristine();
|
||||
$scope.appConfigureForm.$setUntouched();
|
||||
@@ -183,6 +185,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
$scope.appConfigure.accessRestriction = app.accessRestriction || { users: [], groups: [] };
|
||||
$scope.appConfigure.memoryLimit = app.memoryLimit || app.manifest.memoryLimit || (256 * 1024 * 1024);
|
||||
$scope.appConfigure.xFrameOptions = app.xFrameOptions.indexOf('ALLOW-FROM') === 0 ? app.xFrameOptions.split(' ')[1] : '';
|
||||
$scope.appConfigure.customAuth = !(app.manifest.addons['simpleauth'] || app.manifest.addons['ldap'] || app.manifest.addons['oauth']);
|
||||
|
||||
// create ticks starting from manifest memory limit
|
||||
$scope.appConfigure.memoryTicks = [
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</ng-form>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="appInstall.app.manifest.customAuth">
|
||||
<div class="form-group" ng-show="appInstall.customAuth">
|
||||
<label class="control-label">Access control</label>
|
||||
<p>
|
||||
This app has it's own access control and does not integrate with Cloudron Auth.
|
||||
@@ -50,7 +50,7 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-hide="appInstall.app.manifest.customAuth || appInstall.app.manifest.addons.email">
|
||||
<div class="form-group" ng-hide="appInstall.customAuth || appInstall.app.manifest.addons.email">
|
||||
<label class="control-label">Access control</label>
|
||||
<div class="radio">
|
||||
<label>
|
||||
|
||||
@@ -36,6 +36,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
|
||||
keyFileName: '',
|
||||
accessRestrictionOption: 'any',
|
||||
accessRestriction: { users: [], groups: [] },
|
||||
customAuth: false,
|
||||
optionalSso: false,
|
||||
|
||||
isAccessRestrictionValid: function () {
|
||||
@@ -65,6 +66,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
|
||||
$scope.appInstall.accessRestrictionOption = 'any';
|
||||
$scope.appInstall.accessRestriction = { users: [], groups: [] };
|
||||
$scope.appInstall.optionalSso = false;
|
||||
$scope.appInstall.customAuth = false;
|
||||
|
||||
$('#collapseInstallForm').collapse('hide');
|
||||
$('#collapseResourceConstraint').collapse('hide');
|
||||
@@ -107,6 +109,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
|
||||
|
||||
var manifest = app.manifest;
|
||||
$scope.appInstall.optionalSso = !!manifest.optionalSso;
|
||||
$scope.appInstall.customAuth = !(manifest.addons['simpleauth'] || manifest.addons['ldap'] || manifest.addons['oauth']);
|
||||
$scope.appInstall.accessRestrictionOption = 'any';
|
||||
|
||||
// set default ports
|
||||
|
||||
Reference in New Issue
Block a user