Skip to content

Commit 23b4f2f

Browse files
committed
Secure admin pages
1 parent 9fc47cd commit 23b4f2f

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

angular/wallypop/.idea/workspace.xml

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angular/wallypop/src/app/components/category/category.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
<!-- ====== Page content ======-->
33
<!-- {{>nav_side}} -->
4-
<section class="full-width section">
4+
<section class="full-width section" *ngIf="loginService.isAdmin()">
55
<div class="container">
66
<div class="row">
77
<div class="col-xs-12 col-sm-4 col-md-3">

angular/wallypop/src/app/components/category/categoryList.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
<!-- ====== Page content ======-->
33
<!-- {{>nav_side}} -->
4-
<section class="full-width section">
4+
<section class="full-width section" *ngIf="loginService.isAdmin()">
55
<div class="container">
66
<div class="row">
77
<div class="col-xs-12 col-sm-4 col-md-3">

angular/wallypop/src/app/components/report/showReport.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- ====== Page content ======-->
2-
<section class="section">
2+
<section class="section" *ngIf="loginService.isAdmin()">
33
<h2 class="text-center text-light">INCIDENCIA</h2>
44
<div class="container-fluid">
55
<div class="row">

angular/wallypop/src/app/components/report/showReport.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {ReportService} from '../../services/report.service';
22
import {Component, OnInit} from '@angular/core';
33
import { ActivatedRoute, Router } from '@angular/router';
44
import { Report } from 'src/app/models/report.model';
5+
import {LoginService} from '../../services/login.service';
56

67
@Component({
78
selector: 'showReport',
@@ -10,7 +11,7 @@ import { Report } from 'src/app/models/report.model';
1011
export class ShowReportComponent implements OnInit{
1112
report:Report;
1213

13-
constructor(private reportService: ReportService, private activatedRoute: ActivatedRoute, private router: Router) {
14+
constructor(private reportService: ReportService, private activatedRoute: ActivatedRoute, private router: Router, public loginService: LoginService) {
1415
}
1516

1617
ngOnInit(): void {

0 commit comments

Comments
 (0)