mirror of
https://github.com/bitwarden/web
synced 2025-12-13 14:53:25 +00:00
clear vault rootScope when visiting org admin
This commit is contained in:
@@ -269,6 +269,9 @@ angular
|
|||||||
|
|
||||||
// user is guaranteed to be authenticated becuase of previous check
|
// user is guaranteed to be authenticated becuase of previous check
|
||||||
if (toState.name.indexOf('backend.org.') > -1 && toParams.orgId) {
|
if (toState.name.indexOf('backend.org.') > -1 && toParams.orgId) {
|
||||||
|
// clear vault rootScope when visiting org admin section
|
||||||
|
$rootScope.vaultLogins = $rootScope.vaultFolders = null;
|
||||||
|
|
||||||
authService.getUserProfile().then(function (profile) {
|
authService.getUserProfile().then(function (profile) {
|
||||||
var orgs = profile.organizations;
|
var orgs = profile.organizations;
|
||||||
if (!orgs || !(toParams.orgId in orgs) || orgs[toParams.orgId].status !== 2 ||
|
if (!orgs || !(toParams.orgId in orgs) || orgs[toParams.orgId].status !== 2 ||
|
||||||
|
|||||||
Reference in New Issue
Block a user