Coverity-CWE 922: Insecure Storage of Sensitive Information(localStorage write)
- Coverity fix for localStorage write issue: For storing datas
in browser localStorage so changed it to sessionStorage
Change-Id: I5179dbd864d9cf6c9f82fdb54f4ad2544e945ac0
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/dashboard/DashboardComponent.ts b/src/app/dashboard/DashboardComponent.ts
index b3e48e4..3c856dd 100644
--- a/src/app/dashboard/DashboardComponent.ts
+++ b/src/app/dashboard/DashboardComponent.ts
@@ -198,7 +198,7 @@
*/
public ngOnInit(): void {
this.username$ = this.authService.username;
- this.isAdmin = (localStorage.getItem('isAdmin') === 'true') ? true : false;
+ this.isAdmin = (sessionStorage.getItem('isAdmin') === 'true') ? true : false;
this.selectedProject = this.authService.ProjectName;
this.checkAdminPrivilege();
this.getUserAccessedProjects();