Skip to content

Commit

Permalink
Fix: Permission update when changing batch account (#1988)
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeguerin authored Mar 21, 2019
1 parent ede432e commit 7dbc678
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Bug fixes
* Node counts graphs don't recover from errors(e.g. Connection died). [\#1989](https://github.com/Azure/BatchExplorer/issues/1989)
* Null exception in resource files properties [\#1984](https://github.com/Azure/BatchExplorer/issues/1984)
* Only loads permissions for first selected batch account [\#1987](https://github.com/Azure/BatchExplorer/issues/1987)

# 2.0.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Injectable } from "@angular/core";
import { HttpRequestOptions } from "@batch-flask/core";
import { Permission } from "@batch-flask/ui/permission";
import { Observable, empty, of } from "rxjs";
import { expand, flatMap, map, reduce, shareReplay, take } from "rxjs/operators";
import { expand, flatMap, map, reduce, shareReplay, switchMap } from "rxjs/operators";
import { ArmBatchAccount } from "../../models";
import { ArmHttpService } from "../arm-http.service";
import { BatchAccountService } from "../batch-account";
Expand Down Expand Up @@ -31,8 +31,7 @@ export class AuthorizationHttpService {
private armService: ArmHttpService) {

this._permission = this.accountService.currentAccount.pipe(
take(1),
flatMap(account => {
switchMap((account) => {
if (account instanceof ArmBatchAccount) {
const resourceId = account && account.id;
return this.getPermission(resourceId);
Expand Down

0 comments on commit 7dbc678

Please sign in to comment.