mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1070] fix issue with user preferences and page reload (#2075)
* user preferences profile storage support * update unit test
This commit is contained in:
committed by
Eugenio Romano
parent
52ef483216
commit
0262b3426e
@@ -61,6 +61,7 @@ describe('UserPreferencesService', () => {
|
||||
});
|
||||
|
||||
it('should format property key for default prefix', () => {
|
||||
preferences.setStoragePrefix(null);
|
||||
expect(preferences.getPropertyKey('propertyA')).toBe('GUEST__propertyA');
|
||||
});
|
||||
|
||||
|
@@ -26,14 +26,12 @@ export class UserPreferencesService {
|
||||
paginationSize: 25
|
||||
};
|
||||
|
||||
private _storagePrefix: string = 'GUEST';
|
||||
|
||||
getStoragePrefix(): string {
|
||||
return this._storagePrefix;
|
||||
return this.storage.getItem('USER_PROFILE') || 'GUEST';
|
||||
}
|
||||
|
||||
setStoragePrefix(value: string) {
|
||||
this._storagePrefix = value || 'GUEST';
|
||||
this.storage.setItem('USER_PROFILE', value || 'GUEST');
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
Reference in New Issue
Block a user