Revision 57351
Added by Andreas Mantas about 5 years ago
modules/uoa-repository-dashboard-gui/trunk/src/app/pages/sources/sources-update-repo.component.ts | ||
---|---|---|
64 | 64 |
this.errorMessage = loadingRepoError; |
65 | 65 |
}, |
66 | 66 |
() => { |
67 |
if ( this.authService.activateFrontAuthorization && (this.authService.getUserEmail() !== this.repo.registeredBy.trim()) ) { |
|
68 |
this.router.navigateByUrl('/403-forbidden', { skipLocationChange: true }); |
|
69 |
} else { |
|
70 | 67 |
this.logoURL = this.repo.logoUrl; |
71 | 68 |
this.getRepoInterfaces(); |
72 |
} |
|
73 | 69 |
} |
74 | 70 |
); |
75 | 71 |
} |
modules/uoa-repository-dashboard-gui/trunk/src/app/pages/metrics/metrics-enable.component.ts | ||
---|---|---|
60 | 60 |
this.getOAid(); |
61 | 61 |
} |
62 | 62 |
this.loadingMessage = ''; |
63 |
if ( this.authService.activateFrontAuthorization && (this.authService.getUserEmail() !== this.repo.registeredBy.trim()) ) { |
|
64 |
this.router.navigateByUrl('/403-forbidden', { skipLocationChange: true }); |
|
65 |
} |
|
66 | 63 |
} |
67 | 64 |
); |
68 | 65 |
} |
modules/uoa-repository-dashboard-gui/trunk/src/app/pages/metrics/metrics-usagestats-report.component.ts | ||
---|---|---|
80 | 80 |
this.shownRepoId = this.repo.issn.slice(0, 4) + '-' + this.repo.issn.toString().slice(4); |
81 | 81 |
} |
82 | 82 |
this.title = `${this.chosen_report} report for ${this.repo.officialName}`; |
83 |
if ( this.authService.activateFrontAuthorization && (this.authService.getUserEmail() !== this.repo.registeredBy.trim()) ) { |
|
84 |
this.router.navigateByUrl('/403-forbidden', { skipLocationChange: true }); |
|
85 |
} |
|
86 | 83 |
} |
87 | 84 |
); |
88 | 85 |
} |
modules/uoa-repository-dashboard-gui/trunk/src/app/pages/metrics/metrics-instructions.component.ts | ||
---|---|---|
32 | 32 |
piwik => this.piwik = piwik, |
33 | 33 |
error => console.log(error), |
34 | 34 |
() => { |
35 |
if ( this.authService.activateFrontAuthorization && |
|
36 |
(this.authService.getUserEmail() !== this.piwik.requestorEmail.trim()) ) { |
|
37 |
this.router.navigateByUrl('/403-forbidden', { skipLocationChange: true }); |
|
38 |
} |
|
39 | 35 |
} |
40 | 36 |
); |
41 | 37 |
} |
modules/uoa-repository-dashboard-gui/trunk/src/app/pages/metrics/metrics-show.component.ts | ||
---|---|---|
51 | 51 |
() => { |
52 | 52 |
this.loadingMessage = ''; |
53 | 53 |
this.errorMessage = ''; |
54 |
if ( this.authService.activateFrontAuthorization && |
|
55 |
(this.authService.getUserEmail() !== this.piwik.requestorEmail.trim()) ) { |
|
56 |
this.router.navigateByUrl('/403-forbidden', { skipLocationChange: true }); |
|
57 |
} else { |
|
58 |
this.getMetrics(); |
|
59 |
} |
|
54 |
this.getMetrics(); |
|
60 | 55 |
} |
61 | 56 |
); |
62 | 57 |
} |
modules/uoa-repository-dashboard-gui/trunk/src/app/pages/metrics/metrics-usagestats.component.ts | ||
---|---|---|
39 | 39 |
() => { |
40 | 40 |
this.title = this.title + ' for ' + this.repo.officialName; |
41 | 41 |
console.log(this.authService.getUserEmail(), this.repo.registeredBy); |
42 |
if ( this.authService.activateFrontAuthorization && (this.authService.getUserEmail() !== this.repo.registeredBy.trim()) ) { |
|
43 |
this.router.navigateByUrl('/403-forbidden', { skipLocationChange: true }); |
|
44 |
} |
|
45 | 42 |
} |
46 | 43 |
); |
47 | 44 |
} |
modules/uoa-repository-dashboard-gui/trunk/src/app/pages/compatibility/compatibility-monitor-repo.component.ts | ||
---|---|---|
53 | 53 |
this.loadingMessage = ''; |
54 | 54 |
if (this.repo) { |
55 | 55 |
this.repoName = this.repo.officialName; |
56 |
if ( this.authService.activateFrontAuthorization && |
|
57 |
(this.authService.getUserEmail() !== this.repo.registeredBy.trim()) ) { |
|
58 |
this.router.navigateByUrl('/403-forbidden', { skipLocationChange: true }); |
|
59 |
} else { |
|
60 | 56 |
this.getLatestAggregationHistory(); |
61 |
} |
|
62 | 57 |
} else { |
63 | 58 |
this.errorMessage = loadingRepoError; |
64 | 59 |
} |
modules/uoa-repository-dashboard-gui/trunk/src/app/pages/compatibility/compatibility-monitor-fullHistory-repo.component.ts | ||
---|---|---|
54 | 54 |
this.loadingMessage = ''; |
55 | 55 |
if (this.repo) { |
56 | 56 |
this.repoName = this.repo.officialName; |
57 |
if ( this.authService.activateFrontAuthorization && |
|
58 |
(this.authService.getUserEmail() !== this.repo.registeredBy.trim()) ) { |
|
59 |
this.router.navigateByUrl('/403-forbidden', { skipLocationChange: true }); |
|
60 |
} else { |
|
61 | 57 |
this.getAllAggregationHistory(); |
62 |
} |
|
63 | 58 |
} else { |
64 | 59 |
this.errorMessage = loadingRepoError; |
65 | 60 |
} |
modules/uoa-repository-dashboard-gui/trunk/src/app/services/authentication.service.ts | ||
---|---|---|
19 | 19 |
|
20 | 20 |
private _storage: Storage = sessionStorage; |
21 | 21 |
|
22 |
public activateFrontAuthorization: boolean = environment.production; |
|
23 |
|
|
24 | 22 |
isLoggedIn: boolean = false; |
25 | 23 |
|
26 | 24 |
public loginWithState() { |
Also available in: Unified diff
handling of 403-forbidden errors moved to backend controller
(revision 57350 @ /uoa-repository-manager-service/trunk)