Merge branch 'master' of gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot

This commit is contained in:
annampak 2017-11-02 10:50:15 +02:00
commit 43b522ae70
5 changed files with 6 additions and 12 deletions

View File

@ -18,7 +18,7 @@
</div>
<div class="navbar-center">
<h3>Digital Management Plans</h3>
<h3>Data Management Plans Creator</h3>
</div>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown" [ngClass]="{true:'invisible'}[loggedInAs == null]">

View File

@ -182,6 +182,7 @@ export class DynamicFormComponent implements OnInit {
private patchForm(flatList : any){
debugger;
for (var prop in flatList) {
if (flatList.hasOwnProperty(prop)) {
if(prop.endsWith('.id')||prop.endsWith('.answer')||prop.endsWith('.value')) continue;

View File

@ -72,14 +72,6 @@ export class GooggleSignInComponent implements OnInit, AfterViewInit {
this.googleInit();
}
/*
signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
console.log('User signed out.');
});
}
*/
}

View File

@ -2,12 +2,12 @@ import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse, HttpErrorResponse} from '@angular/common/http';
import { TokenService, TokenProvider } from './login/token.service';
import {Router} from '@angular/router';
@Injectable()
export class GlobalInterceptor implements HttpInterceptor {
constructor(public tokenService: TokenService) {}
constructor(public tokenService: TokenService, private router : Router) {}
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
@ -21,6 +21,7 @@ export class GlobalInterceptor implements HttpInterceptor {
if (err instanceof HttpErrorResponse) {
if (err.status === 401) {
this.tokenService.logout();
this.router.navigate(['/dmps'], { queryParams: { /*returnUrl: this.state.url*/ }});
}
}
});

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>Digital Management Plans Creator APP</title>
<title>Data Management Plans Creator</title>
<base href="/">
<meta name="csrf-token" content="2c64def7de30197c40276fe1a7ea874ca8871f70be7d7dc3305465a4d5c565e4">
<meta name="viewport" content="width=device-width, initial-scale=1">