Project

General

Profile

« Previous | Next » 

Revision 57944

[Connect | Trunk]: Remove url from get user info.

View differences:

modules/uoa-connect-portal/trunk/src/app/my-communities/my-communities.component.ts
76 76
        if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
77 77
          this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE Connect", this.properties.piwikSiteId).subscribe();
78 78
        }
79
        this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
79
        this.userManagementService.getUserInfo().subscribe(user => {
80 80
          this.user = user;
81 81
          if(this.user) {
82 82
            this.getCommunities();
modules/uoa-connect-portal/trunk/src/app/community/community.component.ts
79 79
  shareInZenodoPage: string = null;
80 80
  public routerHelper: RouterHelper = new RouterHelper();
81 81
  private user: User;
82
  private loginCheck: boolean = false;
83 82

  
84 83
  constructor(
85 84
    private element: ElementRef,
......
123 122
        this.url = data.envSpecific.baseLink + this._router.url;
124 123
        this.seoService.createLinkForCanonicalURL(this.url, false);
125 124
        this._meta.updateTag({content: this.url}, "property='og:url'");
126
        this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
125
        this.userManagementService.getUserInfo().subscribe(user => {
127 126
          this.user = user;
128
          this.loginCheck = true;
129 127
        });
130 128
        if (this.communityId != null && this.communityId != '') {
131 129
          this._communityService.getCommunity(this.properties, this.properties.communityAPI + this.communityId).subscribe(
......
269 267
  }
270 268

  
271 269
  showInvite() {
272
    return this.loginCheck && this.isManager();
270
    return this.isManager();
273 271
  }
274 272

  
275 273
  isManager() {
modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.component.ts
82 82
      this.searchPage.refineFields = this.refineFields;
83 83
      let queryParams = this.searchPage.getQueryParamsFromUrl(params);
84 84
      if(typeof document !== 'undefined') {
85
        this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
85
        this.userManagementService.getUserInfo().subscribe(user => {
86 86
          this.user = user;
87 87
          this.initCommunities(queryParams);
88 88
        });
modules/uoa-connect-portal/trunk/src/app/utils/subscribe/subscribe.component.ts
68 68
  public ngOnInit() {
69 69
    this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
70 70
      this.properties = data.envSpecific;
71
      this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
71
      this.userManagementService.getUserInfo().subscribe(user => {
72 72
        this.user = user;
73 73
        this.init();
74 74
      });
modules/uoa-connect-portal/trunk/src/app/utils/subscribe/invite/invite.component.ts
95 95
      this.errorMessage = "";
96 96
      this.missingCommunityId = "";
97 97
      this.status = this.errorCodes.LOADING;
98
      this.userManageService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
98
      this.userManageService.getUserInfo().subscribe(user => {
99 99
        this.user = user;
100 100
        this.init();
101 101
      });
modules/uoa-connect-portal/trunk/src/app/app.component.ts
19 19
  `],
20 20
  template: `
21 21
    <div [class]="(community)?(community.id +'App'):'connectApp'">
22
      <navbar *ngIf="properties && showMenu && !community && loginCheck" [portal]="properties.dashboard" [onlyTop]=false
22
      <navbar *ngIf="properties && showMenu && !community" [portal]="properties.dashboard" [onlyTop]=false
23 23
              [userMenuItems]=userMenuItems [menuItems]=menuItems [user]="user"
24 24
              [showMenu]=showMenu [properties]="properties" [showHomeMenuItem]="true"></navbar>
25
      <navbar *ngIf="properties && showMenu  && community && loginCheck" [portal]="properties.dashboard" [onlyTop]=false
25
      <navbar *ngIf="properties && showMenu  && community" [portal]="properties.dashboard" [onlyTop]=false
26 26
              [communityId]="community.id"
27 27
              [userMenuItems]=userMenuItems [menuItems]=menuItems [user]="user"
28 28
              [community]=community [showMenu]=showMenu [properties]="properties" [enableSearch]="true"
......
70 70
  subscriberOfCommunities = false;
71 71
  managerOfCommunities = false;
72 72
  user: User;
73
  loginCheck: boolean = false;
74 73

  
75 74
  //  community: {id:string, name:string, logoUrl:string};
76 75
  constructor(private  route: ActivatedRoute, private propertiesService: EnvironmentSpecificService,
......
94 93
          } catch (e) {
95 94
          }
96 95
        }
97
        this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
96
        this.userManagementService.getUserInfo().subscribe(user => {
98 97
          this.user = user;
99 98
          this.init();
100 99
        });
......
107 106

  
108 107
  private init() {
109 108
    let communityId: string = "";
110
    this.loginCheck = true;
111 109
    if (this.properties.environment == "development") {
112 110
      this.showMenu = false;
113 111
      this.route.queryParams.subscribe(params => {
modules/uoa-connect-portal/trunk/src/assets/env-properties.json
38 38

  
39 39
  "piwikBaseUrl" :"https://analytics.openaire.eu/piwik.php?idsite=",
40 40
  "piwikSiteId" : "80",
41
  "loginUrl" :"http://scoobydoo.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login",
41
  "loginUrl" :"http://dl170.madgik.di.uoa.gr:8180/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login",
42 42

  
43
  "userInfoUrl" : "http://scoobydoo.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
43
  "userInfoUrl" : "http://dl170.madgik.di.uoa.gr:8180/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
44 44

  
45 45
  "logoutUrl" :"https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",
46 46

  
......
50 50

  
51 51
  "cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
52 52

  
53
  "adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools",
53
  "adminToolsAPIURL" :"http://mpagasas.di.uoa.gr:8080/uoa-admin-tools",
54 54

  
55 55
  "adminToolsCommunity" :"connect",
56 56
  "datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",

Also available in: Unified diff