mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Login dialog shows error for Safari with Private Window mode (#1172)
* #958 new StorageService service abstraction around ‘Storage’ to allow switching to in-memory store whenever ‘localStorage’ is not available (i.e. private/incognito modes, etc.) * fix unit tests * update unit tests - disable incorrect auth tests (core) - simplify widget visibility tests (activiti-form) * fix unit tests
This commit is contained in:
committed by
Eugenio Romano
parent
94dad585b1
commit
da70a72bba
@@ -19,12 +19,12 @@ import { NgModule, Component, OnInit } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
||||
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { WebScriptModule } from 'ng2-alfresco-webscript';
|
||||
|
||||
@Component({
|
||||
selector: 'alfresco-app-demo',
|
||||
selector: 'alfresco-app-demo',
|
||||
template: `
|
||||
<label for="ticket"><b>Insert a valid access ticket / ticket:</b></label><br>
|
||||
<input id="ticket" type="text" size="48" (change)="updateTicket()" [(ngModel)]="ticket"><br>
|
||||
@@ -54,23 +54,17 @@ import { WebScriptModule } from 'ng2-alfresco-webscript';
|
||||
class WebscriptDemo implements OnInit {
|
||||
|
||||
currentPath: string = '/';
|
||||
|
||||
authenticated: boolean;
|
||||
|
||||
ecmHost: string = 'http://127.0.0.1:8080';
|
||||
|
||||
scriptPath: string = 'sample/folder/Company%20Home';
|
||||
|
||||
contextRoot: string = 'alfresco';
|
||||
|
||||
servicePath: string = 'service';
|
||||
|
||||
scriptArgs: string = '';
|
||||
|
||||
ticket: string;
|
||||
|
||||
constructor(private authService: AlfrescoAuthenticationService,
|
||||
private settingsService: AlfrescoSettingsService) {
|
||||
private settingsService: AlfrescoSettingsService,
|
||||
private storage: StorageService) {
|
||||
|
||||
settingsService.ecmHost = this.ecmHost;
|
||||
settingsService.setProviders('ECM');
|
||||
@@ -81,7 +75,7 @@ class WebscriptDemo implements OnInit {
|
||||
}
|
||||
|
||||
public updateTicket(): void {
|
||||
localStorage.setItem('ticket-ECM', this.ticket);
|
||||
this.storage.setItem('ticket-ECM', this.ticket);
|
||||
}
|
||||
|
||||
public updateHost(): void {
|
||||
|
Reference in New Issue
Block a user