mirror of
https://github.com/bitwarden/web
synced 2025-12-06 00:03:28 +00:00
27 lines
863 B
JavaScript
27 lines
863 B
JavaScript
angular
|
|
.module('bit.global')
|
|
|
|
.controller('paidOrgRequiredController', function ($scope, $state, $uibModalInstance, $analytics, $uibModalStack, orgId,
|
|
constants, authService) {
|
|
$analytics.eventTrack('paidOrgRequiredController', { category: 'Modal' });
|
|
|
|
authService.getUserProfile().then(function (profile) {
|
|
$scope.admin = profile.organizations[orgId].type !== constants.orgUserType.user;
|
|
});
|
|
|
|
$scope.go = function () {
|
|
if (!$scope.admin) {
|
|
return;
|
|
}
|
|
|
|
$analytics.eventTrack('Get Paid Org');
|
|
$state.go('backend.org.billing', { orgId: orgId }).then(function () {
|
|
$uibModalStack.dismissAll();
|
|
});
|
|
};
|
|
|
|
$scope.close = function () {
|
|
$uibModalInstance.dismiss('close');
|
|
};
|
|
});
|