Fix access control display for email apps

Fixes #45
This commit is contained in:
Girish Ramakrishnan
2016-09-11 23:01:25 -07:00
parent 217fcf564c
commit f2a1e19c9b
4 changed files with 18 additions and 4 deletions

View File

@@ -81,7 +81,14 @@
</p>
</div>
<div class="form-group" ng-hide="appConfigure.app.manifest.singleUser || appConfigure.app.manifest.customAuth">
<div class="form-group" ng-show="appConfigure.app.manifest.addons.email">
<label class="control-label">Access control</label>
<p>
This app authenticates all users using IMAP & SMTP.
</p>
</div>
<div class="form-group" ng-hide="appConfigure.app.manifest.singleUser || appConfigure.app.manifest.customAuth || appConfigure.app.manifest.addons.email">
<label class="control-label">Access control</label>
<div class="radio">
<label>

View File

@@ -193,7 +193,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.appConfigure.xFrameOptions = app.xFrameOptions.indexOf('ALLOW-FROM') === 0 ? app.xFrameOptions.split(' ')[1] : '';
var manifest = app.manifest;
$scope.appConfigure.needsOAuthProxy = !(manifest.addons['ldap'] || manifest.addons['oauth'] || manifest.addons['simpleauth'] || manifest.customAuth);
$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 {

View File

@@ -47,7 +47,14 @@
</p>
</div>
<div class="form-group" ng-hide="appInstall.app.manifest.singleUser || appInstall.app.manifest.customAuth">
<div class="form-group" ng-show="appInstall.app.manifest.addons.email">
<label class="control-label">Access control</label>
<p>
This app authenticates all users using IMAP & SMTP.
</p>
</div>
<div class="form-group" ng-hide="appInstall.app.manifest.singleUser || appInstall.app.manifest.customAuth || appInstall.app.manifest.addons.email">
<label class="control-label">Access control</label>
<div class="radio">
<label>

View File

@@ -109,7 +109,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.appInstall.accessRestrictionSingleUser = null;
var manifest = app.manifest;
$scope.appInstall.needsOAuthProxy = !(manifest.addons['ldap'] || manifest.addons['oauth'] || manifest.addons['simpleauth'] || manifest.customAuth);
$scope.appInstall.needsOAuthProxy = !(manifest.addons['ldap'] || manifest.addons['oauth'] || manifest.addons['simpleauth'] || manifest.addons['email'] || manifest.customAuth);
$scope.appInstall.accessRestrictionOption = 'any';
// set default ports