conditionally show groups option

This commit is contained in:
Kyle Spearrin 2017-05-09 20:35:18 -04:00
parent dce609d141
commit eb7fd4a015
2 changed files with 12 additions and 3 deletions

View File

@ -1,11 +1,20 @@
angular
.module('bit.organization')
.controller('organizationPeopleController', function ($scope, $state, $uibModal, cryptoService, apiService,
.controller('organizationPeopleController', function ($scope, $state, $uibModal, cryptoService, apiService, authService,
toastr, $analytics) {
$scope.users = [];
$scope.useGroups = false;
$scope.$on('$viewContentLoaded', function () {
loadList();
authService.getUserProfile().then(function (profile) {
if (profile.organizations) {
var org = profile.organizations[$state.params.orgId];
$scope.useGroups = !!org.useGroups;
}
});
});
$scope.reinvite = function (user) {
@ -97,7 +106,7 @@
});
modal.result.then(function () {
});
};

View File

@ -42,7 +42,7 @@
</a>
</li>
<li>
<a href="javascript:void(0)" ng-click="groups(user)">
<a href="javascript:void(0)" ng-click="groups(user)" ng-if="useGroups">
<i class="fa fa-fw fa-sitemap"></i> Groups
</a>
</li>