Update for member guard. (#2182)

This commit is contained in:
kun wang 2017-04-28 18:44:44 +08:00 committed by Daniel Jiang
parent edbd4a8973
commit 89f5905f34

View File

@ -33,9 +33,6 @@ export class MemberGuard implements CanActivate, CanActivateChild {
let projectId = route.params['id']; let projectId = route.params['id'];
this.sessionService.setProjectMembers([]); this.sessionService.setProjectMembers([]);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let projectId = route.params['id'];
this.sessionService.setProjectMembers([]);
return new Promise((resolve, reject) => {
this.projectService.checkProjectMember(projectId) this.projectService.checkProjectMember(projectId)
.subscribe( .subscribe(
res=>{ res=>{
@ -50,7 +47,6 @@ export class MemberGuard implements CanActivate, CanActivateChild {
this.router.navigate([CommonRoutes.HARBOR_DEFAULT]); this.router.navigate([CommonRoutes.HARBOR_DEFAULT]);
return resolve(false); return resolve(false);
}); });
});
}); });
} }