Revision 54935
Added by Argiro Kokogiannaki over 5 years ago
modules/uoa-services-portal/trunk/explore/src/app/app.component.ts | ||
---|---|---|
41 | 41 |
clientLoad = 0; |
42 | 42 |
|
43 | 43 |
userMenuItems:MenuItem[] = [ new MenuItem("","My profile","","",false,[],[],{}), |
44 |
new MenuItem("","My links","","/myclaims",false,[],["/myclaims"],{}), |
|
45 |
new MenuItem("","Manage all links","","/claims",true,[],["/claims"],{})] |
|
44 |
new MenuItem("","My links","","/myclaims",false,[],["/myclaims"],{})] |
|
46 | 45 |
|
47 | 46 |
|
48 | 47 |
menuItems:RootMenuItem [] = [ |
... | ... | |
97 | 96 |
this.properties = this.propertiesService.envSpecific; |
98 | 97 |
this.feedbackmail = this.properties.feedbackmail; |
99 | 98 |
if(Session.isPortalAdministrator()){ |
99 |
this.userMenuItems.push(new MenuItem("","Manage all links","","/claims",false,[],["/claims"],{})); |
|
100 | 100 |
this.userMenuItems.push(new MenuItem("","Manage helptexts", |
101 | 101 |
((this.properties.environment == "beta")?"https://beta.admin.connect.openaire.eu":"https://admin.explore.openaire.eu")+"/dashboard?communityId=openaire","",true,[],[],{})) |
102 |
|
|
103 |
}else if(Session.isClaimsCurator()){ |
|
104 |
this.userMenuItems.push(new MenuItem("","Manage all links","","/claims",false,[],["/claims"],{})); |
|
105 |
|
|
102 | 106 |
} |
103 | 107 |
//console.log(this.properties.loginUrl); |
104 | 108 |
}, error => { |
modules/uoa-services-portal/trunk/explore/src/app/claims/claimsAdmin/claimsAdmin-routing.module.ts | ||
---|---|---|
1 | 1 |
import { NgModule } from '@angular/core'; |
2 | 2 |
import { RouterModule } from '@angular/router'; |
3 | 3 |
import { OpenaireClaimsAdminComponent } from './claimsAdmin.component'; |
4 |
import{ AdminLoginGuard} from '../../openaireLibrary/login/adminLoginGuard.guard';
|
|
4 |
import{ ClaimsCuratorGuard} from '../../openaireLibrary/login/claimsCuratorGuard.guard';
|
|
5 | 5 |
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; |
6 | 6 |
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; |
7 | 7 |
|
... | ... | |
9 | 9 |
@NgModule({ |
10 | 10 |
imports: [ |
11 | 11 |
RouterModule.forChild([ |
12 |
{ path: '', component: OpenaireClaimsAdminComponent, canActivate: [IsRouteEnabled, AdminLoginGuard],
|
|
12 |
{ path: '', component: OpenaireClaimsAdminComponent, canActivate: [IsRouteEnabled, ClaimsCuratorGuard],
|
|
13 | 13 |
data: {redirect: '/error', community : 'openaire'}, canDeactivate: [PreviousRouteRecorder]}]) |
14 | 14 |
] |
15 | 15 |
}) |
modules/uoa-services-portal/trunk/explore/src/app/claims/claimsAdmin/claimsAdmin.module.ts | ||
---|---|---|
4 | 4 |
import { OpenaireClaimsAdminComponent } from './claimsAdmin.component'; |
5 | 5 |
import { ClaimsAdminRoutingModule } from './claimsAdmin-routing.module'; |
6 | 6 |
import{ClaimsAdminModule } from '../../openaireLibrary/claims/claimsAdmin/claimsAdmin.module'; |
7 |
import {AdminLoginGuard} from '../../openaireLibrary/login/adminLoginGuard.guard';
|
|
7 |
import{ ClaimsCuratorGuard} from '../../openaireLibrary/login/claimsCuratorGuard.guard';
|
|
8 | 8 |
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; |
9 | 9 |
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; |
10 | 10 |
|
... | ... | |
15 | 15 |
ClaimsAdminRoutingModule, |
16 | 16 |
ClaimsAdminModule |
17 | 17 |
], |
18 |
providers:[AdminLoginGuard, PreviousRouteRecorder,IsRouteEnabled],
|
|
18 |
providers:[ClaimsCuratorGuard, PreviousRouteRecorder,IsRouteEnabled],
|
|
19 | 19 |
declarations: [ |
20 | 20 |
OpenaireClaimsAdminComponent |
21 | 21 |
] |
modules/uoa-services-portal/trunk/explore/src/assets/env-properties.json | ||
---|---|---|
7 | 7 |
"framesAPIURL" : "https://beta.openaire.eu/stats3/", |
8 | 8 |
"statisticsAPIURL" : "http://vatopedi.di.uoa.gr:8080/stats/", |
9 | 9 |
"statisticsFrameAPIURL":"https://beta.openaire.eu/stats/", |
10 |
"claimsAPIURL" : "http://duffy.di.uoa.gr:8080/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",
|
|
10 |
"claimsAPIURL" : "http://scoobydoo.di.uoa.gr:8080/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",
|
|
11 | 11 |
"searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/", |
12 | 12 |
"searchResourcesAPIURL" : "https://beta.services.openaire.eu/search/v2/api/resources", |
13 | 13 |
"openCitationsAPIURL" : "https://services.openaire.eu/opencitations/getCitations?id=", |
Also available in: Unified diff
[Trunk]
Change guard in claims administration page use ClaimsCuratorGuard
In app component add manage claims links only for admins and claims curators