* @Injectable takes a metadata object that tells Angular how to compile and run module code
*/
@Injectable()
+// eslint-disable-next-line deprecation/deprecation
export class AcessGuardService implements CanLoad {
/**
* check if module can be loaded
*/
public canLoad(route: Route): Observable<boolean> | Promise<boolean> | boolean {
// Need to get the Role and valid here for authorization
- if (localStorage.getItem('role') === 'Admin') {
+ if (sessionStorage.getItem('role') === 'Admin') {
return true;
} else {
return false;