Implement authentication feature with role-based access control and login dialog

This commit is contained in:
2025-11-07 17:53:11 +01:00
parent 87a1ab06d9
commit b4f0b7256a
11 changed files with 224 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
import { AuthService } from './../auth.service';
import { Component, inject, computed, OnInit } from '@angular/core';
@Component({
selector: 'app-navbar',
@@ -11,4 +12,12 @@ export class NavbarComponent {
{label: 'Programm', path: '/schedule'},
{label: 'Film importieren', path: '/admin/movie-importer'},
]
private auth = inject(AuthService)
currentUser = computed(() => this.auth.user());
logout() {
this.auth.logout();
}
}