Skip to content

Commit

Permalink
fix(authentication): set active datadog rum user (DEV-325) (#624)
Browse files Browse the repository at this point in the history
* refactor(login): new login structure

* refactor(login): new login structure

* refactor(login): new login structure

* refactor(header): clean up code

* refactor(tests): clean up tests

* refactor(login): new login structure

* fix(datadog): re-init data dog user

* test(session): fix tests

* fix(authentication): set active datadog rum user

* fix(authentication): set active datadog rum user
  • Loading branch information
kilchenmann committed Dec 16, 2021
1 parent 2341a84 commit 69308e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/main/services/authentication.service.spec.ts
Expand Up @@ -20,7 +20,7 @@ describe('AuthenticationService', () => {

const cacheServiceSpy = jasmine.createSpyObj('CacheService', ['destroy']);

const datadogRumServiceSpy = jasmine.createSpyObj('datadogRumService', ['removeActiveUser']);
const datadogRumServiceSpy = jasmine.createSpyObj('datadogRumService', ['', 'removeActiveUser']);


beforeEach(() => {
Expand Down
8 changes: 5 additions & 3 deletions src/app/main/services/datadog-rum.service.ts
Expand Up @@ -34,9 +34,11 @@ export class DatadogRumService {
});

// if session is valid: setActiveUser
this._session.isSessionValid().subscribe((response) => {
const session: Session = this._session.getSession();
this.setActiveUser(session.user.name, 'username');
this._session.isSessionValid().subscribe((response: boolean) => {
if (response) {
const session: Session = this._session.getSession();
this.setActiveUser(session.user.name, 'username');
}
});

}
Expand Down

0 comments on commit 69308e0

Please sign in to comment.