[Connect | Trunk]: Remove url from get user info.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@57944 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
cdeadce912
commit
5641e3aaea
|
@ -19,10 +19,10 @@ import {UserManagementService} from "./openaireLibrary/services/user-management.
|
|||
`],
|
||||
template: `
|
||||
<div [class]="(community)?(community.id +'App'):'connectApp'">
|
||||
<navbar *ngIf="properties && showMenu && !community && loginCheck" [portal]="properties.dashboard" [onlyTop]=false
|
||||
<navbar *ngIf="properties && showMenu && !community" [portal]="properties.dashboard" [onlyTop]=false
|
||||
[userMenuItems]=userMenuItems [menuItems]=menuItems [user]="user"
|
||||
[showMenu]=showMenu [properties]="properties" [showHomeMenuItem]="true"></navbar>
|
||||
<navbar *ngIf="properties && showMenu && community && loginCheck" [portal]="properties.dashboard" [onlyTop]=false
|
||||
<navbar *ngIf="properties && showMenu && community" [portal]="properties.dashboard" [onlyTop]=false
|
||||
[communityId]="community.id"
|
||||
[userMenuItems]=userMenuItems [menuItems]=menuItems [user]="user"
|
||||
[community]=community [showMenu]=showMenu [properties]="properties" [enableSearch]="true"
|
||||
|
@ -70,7 +70,6 @@ export class AppComponent {
|
|||
subscriberOfCommunities = false;
|
||||
managerOfCommunities = false;
|
||||
user: User;
|
||||
loginCheck: boolean = false;
|
||||
|
||||
// community: {id:string, name:string, logoUrl:string};
|
||||
constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService,
|
||||
|
@ -94,7 +93,7 @@ export class AppComponent {
|
|||
} catch (e) {
|
||||
}
|
||||
}
|
||||
this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
|
||||
this.userManagementService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
this.init();
|
||||
});
|
||||
|
@ -107,7 +106,6 @@ export class AppComponent {
|
|||
|
||||
private init() {
|
||||
let communityId: string = "";
|
||||
this.loginCheck = true;
|
||||
if (this.properties.environment == "development") {
|
||||
this.showMenu = false;
|
||||
this.route.queryParams.subscribe(params => {
|
||||
|
|
|
@ -79,7 +79,6 @@ export class CommunityComponent {
|
|||
shareInZenodoPage: string = null;
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
private user: User;
|
||||
private loginCheck: boolean = false;
|
||||
|
||||
constructor(
|
||||
private element: ElementRef,
|
||||
|
@ -123,9 +122,8 @@ export class CommunityComponent {
|
|||
this.url = data.envSpecific.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url, false);
|
||||
this._meta.updateTag({content: this.url}, "property='og:url'");
|
||||
this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
|
||||
this.userManagementService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
this.loginCheck = true;
|
||||
});
|
||||
if (this.communityId != null && this.communityId != '') {
|
||||
this._communityService.getCommunity(this.properties, this.properties.communityAPI + this.communityId).subscribe(
|
||||
|
@ -269,7 +267,7 @@ export class CommunityComponent {
|
|||
}
|
||||
|
||||
showInvite() {
|
||||
return this.loginCheck && this.isManager();
|
||||
return this.isManager();
|
||||
}
|
||||
|
||||
isManager() {
|
||||
|
|
|
@ -76,7 +76,7 @@ export class MyCommunitiesComponent {
|
|||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE Connect", this.properties.piwikSiteId).subscribe();
|
||||
}
|
||||
this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
|
||||
this.userManagementService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
if(this.user) {
|
||||
this.getCommunities();
|
||||
|
|
|
@ -82,7 +82,7 @@ export class SearchCommunitiesComponent {
|
|||
this.searchPage.refineFields = this.refineFields;
|
||||
let queryParams = this.searchPage.getQueryParamsFromUrl(params);
|
||||
if(typeof document !== 'undefined') {
|
||||
this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
|
||||
this.userManagementService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
this.initCommunities(queryParams);
|
||||
});
|
||||
|
|
|
@ -95,7 +95,7 @@ export class InviteComponent implements OnInit {
|
|||
this.errorMessage = "";
|
||||
this.missingCommunityId = "";
|
||||
this.status = this.errorCodes.LOADING;
|
||||
this.userManageService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
|
||||
this.userManageService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
this.init();
|
||||
});
|
||||
|
|
|
@ -68,7 +68,7 @@ export class SubscribeComponent {
|
|||
public ngOnInit() {
|
||||
this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
|
||||
this.userManagementService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
this.init();
|
||||
});
|
||||
|
|
|
@ -38,9 +38,9 @@
|
|||
|
||||
"piwikBaseUrl" :"https://analytics.openaire.eu/piwik.php?idsite=",
|
||||
"piwikSiteId" : "80",
|
||||
"loginUrl" :"http://scoobydoo.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login",
|
||||
"loginUrl" :"http://dl170.madgik.di.uoa.gr:8180/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login",
|
||||
|
||||
"userInfoUrl" : "http://scoobydoo.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
|
||||
"userInfoUrl" : "http://dl170.madgik.di.uoa.gr:8180/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
|
||||
|
||||
"logoutUrl" :"https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
"cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
|
||||
|
||||
"adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools",
|
||||
"adminToolsAPIURL" :"http://mpagasas.di.uoa.gr:8080/uoa-admin-tools",
|
||||
|
||||
"adminToolsCommunity" :"connect",
|
||||
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
|
||||
|
|
Loading…
Reference in New Issue