mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-10 06:08:34 +02:00
22 lines
712 B
JavaScript
22 lines
712 B
JavaScript
angular
|
|
.module('bit.global')
|
|
|
|
.controller('sideNavController', function ($scope, $state, authService) {
|
|
$scope.$state = $state;
|
|
$scope.params = $state.params;
|
|
|
|
if ($state.includes('backend.org')) {
|
|
var userProfile = authService.getUserProfile();
|
|
if (!userProfile.organizations || !userProfile.organizations.length) {
|
|
return;
|
|
}
|
|
|
|
for (var i = 0; i < userProfile.organizations.length; i++) {
|
|
if (userProfile.organizations[i].id === $state.params.orgId) {
|
|
$scope.orgProfile = userProfile.organizations[i];
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
});
|