Skip to content

Commit

Permalink
Apply semantic order in isLoggedInAndHasCapabilities$ fn
Browse files Browse the repository at this point in the history
  • Loading branch information
akabiru committed Jan 20, 2025
1 parent edc7732 commit 3ca5f06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/app/core/current-user/current-user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ export class CurrentUserService {

public isLoggedInAndHasCapabalities$(action:string|string[], projectContext:string|null):Observable<boolean> {
return combineLatest([
this.hasCapabilities$(action, projectContext),
this.isLoggedIn$,
this.hasCapabilities$(action, projectContext),
]).pipe(
map(([hasCapabilities, isLoggedIn]) => hasCapabilities && isLoggedIn),
map(([isLoggedIn, hasCapabilities]) => isLoggedIn && hasCapabilities),
);
}

Expand Down

0 comments on commit 3ca5f06

Please sign in to comment.