use properties| add admin claims| guards

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@50682 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-02-12 11:43:08 +00:00
parent 224c280990
commit 5a4235eb25
5 changed files with 51 additions and 22 deletions

View File

@ -1,4 +1,4 @@
<navbar portal="connect" logoPath="imgs/" onlyTop=true userMenu=true [userMenuItems]=userMenuItems [menuItems]=menuItems [(logInUrl)]=logInUrl [(logOutUrl)]=logOutUrl></navbar>
<navbar portal="connect" logoPath="imgs/" onlyTop=true userMenu=true [userMenuItems]=userMenuItems [menuItems]=menuItems [(logInUrl)]=logInUrl [(logOutUrl)]=logOutUrl [(community)]=community></navbar>
<!--div class="">
<div class="uk-navbar-left uk-visible@l ">

View File

@ -5,6 +5,8 @@
import { Component } from '@angular/core';
import {Properties} from './utils/properties';
import{MenuItem, RootMenuItem} from 'ng-openaire-library';
import {ActivatedRoute} from '@angular/router';
@Component({
selector: 'metadata-registry-service',
templateUrl: './app.component.html',
@ -32,9 +34,23 @@ export class AppComponent {
// ];
logInUrl = null;
logOutUrl = null;
constructor( ) {}
community: {id:string, name:string, logoUrl:string};
constructor( private route: ActivatedRoute) {}
ngOnInit() {
this.route.queryParams.subscribe(data => {
if(data['community'] && data['community']!=""){
this.community = {id: data['community'], name: "Egi Federation", logoUrl:"https:\/\/egi.eu/wp-content/uploads/2016/05/cropped-logo_site-1-300x300.png"};
}else{
this.community = null;
}
});
this.logInUrl = Properties.getLoginURL();
this.logOutUrl = Properties.getLogoutURL();
console.log("login url "+this.logInUrl)

View File

@ -38,9 +38,11 @@ import { DivHelpContentsComponent } from "./pages/divhelpcontent/div-help-conten
import { NewDivHelpContentComponent } from "./pages/divhelpcontent/new-div-help-content.component";
import { DivContentFormComponent } from "./pages/divhelpcontent/div-help-content-form.component";
import { EditDivHelpContentComponent } from "./pages/divhelpcontent/edit-div-help-content.component";
import {BottomModule, FeedbackModule, NavigationBarModule, CookieLawModule} from 'ng-openaire-library';
import {FreeGuard, AdminLoginGuard} from 'ng-openaire-library';
import {ClaimsComponent} from './pages/claims/claims.component';
import {BottomModule, FeedbackModule, NavigationBarModule, CookieLawModule} from 'ng-openaire-library';
import {FreeGuard, AdminLoginGuard, EnvironmentSpecificResolver, EnvironmentSpecificService} from 'ng-openaire-library';
import{ClaimsAdminModule, Meta} from 'ng-openaire-library';
//, , ErrorModule CookieLawModule
@NgModule({
imports: [
@ -55,7 +57,7 @@ import {FreeGuard, AdminLoginGuard} from 'ng-openaire-library';
ReactiveFormsModule,
// JWBootstrapSwitchModule,
CKEditorModule,
BottomModule, FeedbackModule, NavigationBarModule, CookieLawModule
BottomModule, FeedbackModule, NavigationBarModule, CookieLawModule, ClaimsAdminModule
// , CookieLawModule, ErrorModule
],
declarations: [
@ -83,13 +85,14 @@ import {FreeGuard, AdminLoginGuard} from 'ng-openaire-library';
DivHelpContentsComponent,
NewDivHelpContentComponent,
EditDivHelpContentComponent,
DivContentFormComponent
DivContentFormComponent,
ClaimsComponent
],
providers: [
FAQService,
HelpContentService,
appRoutingProviders,
FreeGuard, AdminLoginGuard
FreeGuard, AdminLoginGuard, EnvironmentSpecificResolver,EnvironmentSpecificService, Meta
],
bootstrap: [ AppComponent ]
})

View File

@ -16,8 +16,10 @@ import { DivIdsComponent } from "./pages/divId/divIds.component";
import { DivHelpContentsComponent } from "./pages/divhelpcontent/div-help-contents.component";
import { NewDivHelpContentComponent } from "./pages/divhelpcontent/new-div-help-content.component";
import { EditDivHelpContentComponent } from "./pages/divhelpcontent/edit-div-help-content.component";
import {ClaimsComponent} from './pages/claims/claims.component';
import {FreeGuard, AdminLoginGuard} from 'ng-openaire-library';
import {EnvironmentSpecificResolver, EnvironmentSpecificService, ClaimsAdminComponent} from 'ng-openaire-library';
const appRoutes: Routes = [
@ -29,66 +31,74 @@ const appRoutes: Routes = [
{
path: 'dashboard',
component: DashboardComponent,
canActivate: [FreeGuard]
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'communities',
component: CommunitiesComponent,
canActivate: [FreeGuard]
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'community-edit-form',
component: CommunityEditFormComponent,
canActivate: [FreeGuard]
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'entities',
component: EntitiesComponent,
canActivate: [FreeGuard]
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'classes',
component: DivIdsComponent,
component: DivIdsComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'pages',
component: PagesComponent,
canActivate: [FreeGuard]
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'pageContents',
component: PageHelpContentsComponent,
canActivate: [FreeGuard]
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'pageContents/new',
component: NewPageHelpContentComponent,
canActivate: [FreeGuard]
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
//path: 'pageContents/edit/:id',
path: 'pageContents/edit',
component: EditPageHelpContentComponent,
canActivate: [FreeGuard]
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'classContents',
component: DivHelpContentsComponent,
component: DivHelpContentsComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'classContents/new',
component: NewDivHelpContentComponent,
component: NewDivHelpContentComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'classContents/edit',
component: EditDivHelpContentComponent,
component: EditDivHelpContentComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'claims',
component: ClaimsComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
},
{ path: '**',pathMatch: 'full',component: DashboardComponent }
];
];
// @NgModule({
// imports: [RouterModule.forRoot(appRoutes)],
// exports: [RouterModule],
// providers: [EnvironmentSpecificResolver, EnvironmentSpecificService]
// })
export const appRoutingProviders: any[] = [
];

View File

@ -9,7 +9,7 @@
"deploy:server": "docker rm -f omtd-platform && docker run --name omtd-platform -d -p 80:80 omtd-platform",
"deploy:complete": "npm run build:docker && npm run deploy:server",
"watch": "npm run build --watch",
"server": "webpack-dev-server --inline --progress --port 3200 --content-base . --disable-host-check --host 0.0.0.0",
"server": "webpack-dev-server --inline --progress --port 5000 --content-base . --disable-host-check --host 0.0.0.0",
"start": "npm run server "
},
"license": "ISC",