Project

General

Profile

« Previous | Next » 

Revision 53010

added authorization check to usagestats report request pages

View differences:

modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics-usagestats-report.component.ts
79 79
          this.issnToShow = this.repo.issn.slice(0, 4)+ '-' + this.repo.issn.toString().slice(4);
80 80
        }
81 81
        this.title = `${this.chosen_report} report for ${this.repo.officialName}`;
82
        // TODO: UNCOMMENT
83
        /*if ( this.authService.getUserEmail() !== this.repo.registeredBy ) {
82
        if ( this.authService.getUserEmail() !== this.repo.registeredBy ) {
84 83
          this.router.navigateByUrl('/403-forbidden', { skipLocationChange: true });
85
        }*/
84
        }
86 85
      }
87 86
    );
88 87
  }
modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics-usagestats.component.ts
41 41
        },
42 42
        () => {
43 43
          this.title = this.title + ' for ' + this.repo.officialName;
44
          // TODO: UNCOMMENT
45
          /*if ( this.authService.getUserEmail() !== this.repo.registeredBy ) {
44
          if ( this.authService.getUserEmail() !== this.repo.registeredBy ) {
46 45
            this.router.navigateByUrl('/403-forbidden', { skipLocationChange: true });
47
          }*/
46
          }
48 47
        }
49 48
      );
50 49
    }

Also available in: Unified diff