Org disabled message for self host

This commit is contained in:
Kyle Spearrin 2017-11-07 21:06:00 -05:00
parent 2c36a2aa96
commit 9d76990f24
2 changed files with 13 additions and 5 deletions

View File

@ -1,7 +1,9 @@
angular angular
.module('bit.organization') .module('bit.organization')
.controller('organizationDashboardController', function ($scope, authService, $state) { .controller('organizationDashboardController', function ($scope, authService, $state, appSettings) {
$scope.selfHosted = appSettings.selfHosted;
$scope.$on('$viewContentLoaded', function () { $scope.$on('$viewContentLoaded', function () {
authService.getUserProfile().then(function (userProfile) { authService.getUserProfile().then(function (userProfile) {
if (!userProfile.organizations) { if (!userProfile.organizations) {
@ -10,4 +12,8 @@
$scope.orgProfile = userProfile.organizations[$state.params.orgId]; $scope.orgProfile = userProfile.organizations[$state.params.orgId];
}); });
}); });
$scope.goBilling = function () {
$state.go('backend.org.billing', { orgId: $state.params.orgId })
};
}); });

View File

@ -7,10 +7,12 @@
<section class="content"> <section class="content">
<div class="callout callout-warning" ng-if="!orgProfile.enabled"> <div class="callout callout-warning" ng-if="!orgProfile.enabled">
<h4><i class="fa fa-warning"></i> Organization Disabled</h4> <h4><i class="fa fa-warning"></i> Organization Disabled</h4>
<p> <p>This organization is currently disabled. Users will not see your shared logins or collections.</p>
This organization is currently disabled. Users will not see your shared logins or collections. <p ng-if="!selfHosted">Contact us if you would like to reinstate this organization.</p>
Contact us if you would like to reinstate this organization. <p ng-if="selfHosted">Update your license to reinstate this organization.</p>
</p> <a ng-if="selfHosted" class="btn btn-default btn-flat" href="#" stop-click ng-click="goBilling()">
Billing &amp; Licensing
</a>
<a class="btn btn-default btn-flat" href="https://bitwarden.com/contact/" target="_blank"> <a class="btn btn-default btn-flat" href="https://bitwarden.com/contact/" target="_blank">
Contact Us Contact Us
</a> </a>