Allow setting app visibility for non-SSO apps

Fixes #532
This commit is contained in:
Girish Ramakrishnan
2018-05-25 13:59:53 -07:00
parent 08955ce5a4
commit a3e253436e
2 changed files with 17 additions and 27 deletions

View File

@@ -47,39 +47,31 @@
</ng-form>
</div>
<div class="form-group" ng-show="appConfigure.customAuth && !appConfigure.app.manifest.addons.email">
<label class="control-label">User management</label>
<p>
<div class="form-group">
<label ng-show="appConfigure.ssoAuth" class="control-label">User management</label>
<label ng-show="!appConfigure.ssoAuth" class="control-label">Dashboard visibility</label>
<p ng-show="!appConfigure.ssoAuth && !appConfigure.app.manifest.addons.email" class="text-small">
This app has it's own user management.
</p>
</div>
<div class="form-group" ng-show="!appConfigure.customAuth && appConfigure.app.sso === false">
<label class="control-label">User management</label>
<p>
This app is configured to use it's own user management.
<p ng-show="!appConfigure.ssoAuth && appConfigure.app.manifest.addons.email">
This app is pre-configured for use with <a href="https://cloudron.io/documentation/email/" target="_blank">Cloudron Email</a>.
</p>
</div>
<div class="form-group" ng-show="appConfigure.app.manifest.addons.email">
<label class="control-label">User management</label>
<p>
All users with a mailbox on this Cloudron have access.
</p>
</div>
<div class="form-group" ng-hide="appConfigure.customAuth || appConfigure.app.manifest.addons.email || appConfigure.app.sso === false">
<label class="control-label">User management</label>
<div class="radio">
<label>
<input type="radio" ng-model="appConfigure.accessRestrictionOption" value="any">
Allow all users from this Cloudron
<span ng-show="appConfigure.ssoAuth">Allow all users on this Cloudron</span>
<span ng-show="!appConfigure.ssoAuth">Visible to all users on this Cloudron</span>
</label>
</div>
<div class="radio">
<label>
<input type="radio" ng-model="appConfigure.accessRestrictionOption" value="groups">
Only allow the following users and groups <span class="label label-danger" ng-show="appConfigure.accessRestrictionOption === 'groups' && !appConfigure.isAccessRestrictionValid()">Select at least one user or group</span>
<span ng-show="appConfigure.ssoAuth">Only allow the following users and groups</span>
<span ng-show="!appConfigure.ssoAuth">Only visible to the following users and groups</span>
<span class="label label-danger" ng-show="appConfigure.accessRestrictionOption === 'groups' && !appConfigure.isAccessRestrictionValid()">Select at least one user or group</span>
</label>
</div>
<div>
@@ -100,9 +92,6 @@
<br/>
</div>
<p ng-show="appConfigure.app.manifest.addons.email" class="text-info">
This app is pre-configured for use with <a href="https://cloudron.io/documentation/email/" target="_blank">Cloudron Email</a>.
</p>
</uib-tab>
<uib-tab index="1" heading="Advanced">