mirror of
https://github.com/bitwarden/web
synced 2025-12-23 19:53:16 +00:00
access control on orgs pages
This commit is contained in:
@@ -24,15 +24,20 @@
|
||||
return authService.getUserProfile();
|
||||
}).then(function (profile) {
|
||||
if (profile && profile.organizations) {
|
||||
var orgs = [];
|
||||
for (var i = 0; i < profile.organizations.length; i++) {
|
||||
orgs.push({
|
||||
id: profile.organizations[i].id,
|
||||
name: profile.organizations[i].name
|
||||
});
|
||||
var orgs = [],
|
||||
setFirstOrg = false;
|
||||
|
||||
if (i === 0) {
|
||||
$scope.model.organizationId = profile.organizations[i].id;
|
||||
for (var i in profile.organizations) {
|
||||
if (profile.organizations.hasOwnProperty(i)) {
|
||||
orgs.push({
|
||||
id: profile.organizations[i].id,
|
||||
name: profile.organizations[i].name
|
||||
});
|
||||
|
||||
if (!setFirstOrg) {
|
||||
setFirstOrg = true;
|
||||
$scope.model.organizationId = profile.organizations[i].id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user