conditionally show groups option
This commit is contained in:
parent
dce609d141
commit
eb7fd4a015
|
@ -1,11 +1,20 @@
|
||||||
angular
|
angular
|
||||||
.module('bit.organization')
|
.module('bit.organization')
|
||||||
|
|
||||||
.controller('organizationPeopleController', function ($scope, $state, $uibModal, cryptoService, apiService,
|
.controller('organizationPeopleController', function ($scope, $state, $uibModal, cryptoService, apiService, authService,
|
||||||
toastr, $analytics) {
|
toastr, $analytics) {
|
||||||
$scope.users = [];
|
$scope.users = [];
|
||||||
|
$scope.useGroups = false;
|
||||||
|
|
||||||
$scope.$on('$viewContentLoaded', function () {
|
$scope.$on('$viewContentLoaded', function () {
|
||||||
loadList();
|
loadList();
|
||||||
|
|
||||||
|
authService.getUserProfile().then(function (profile) {
|
||||||
|
if (profile.organizations) {
|
||||||
|
var org = profile.organizations[$state.params.orgId];
|
||||||
|
$scope.useGroups = !!org.useGroups;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.reinvite = function (user) {
|
$scope.reinvite = function (user) {
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<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
|
<i class="fa fa-fw fa-sitemap"></i> Groups
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in New Issue