Settings-Seiten mit Authorize-Attribut versehen
This commit is contained in:
parent
e03653de58
commit
fde6d87905
@ -1,9 +1,11 @@
|
|||||||
@page "/settings/quizzes/edit"
|
@page "/settings/quizzes/edit"
|
||||||
@page "/settings/quizzes/edit/{id}"
|
@page "/settings/quizzes/edit/{id}"
|
||||||
@using FWLAZ_Web.Data
|
@using FWLAZ_Web.Data
|
||||||
|
@using Microsoft.AspNetCore.Authorization
|
||||||
@using Microsoft.EntityFrameworkCore
|
@using Microsoft.EntityFrameworkCore
|
||||||
@inject IDbContextFactory<LocalDbContext> DbFactory;
|
@inject IDbContextFactory<LocalDbContext> DbFactory;
|
||||||
@inject NavigationManager nav;
|
@inject NavigationManager nav;
|
||||||
|
@attribute [Authorize]
|
||||||
<h3>QuizEdit</h3>
|
<h3>QuizEdit</h3>
|
||||||
|
|
||||||
<div class="d-flex gap-3">
|
<div class="d-flex gap-3">
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
@page "/settings/quizzes/questions/{id}"
|
@page "/settings/quizzes/questions/{id}"
|
||||||
@using FWLAZ_Web.Data
|
@using FWLAZ_Web.Data
|
||||||
@using FWLAZ_Web.Objects
|
@using FWLAZ_Web.Objects
|
||||||
|
@using Microsoft.AspNetCore.Authorization
|
||||||
@using Microsoft.EntityFrameworkCore;
|
@using Microsoft.EntityFrameworkCore;
|
||||||
@inject IDbContextFactory<LocalDbContext> DbFactory;
|
@inject IDbContextFactory<LocalDbContext> DbFactory;
|
||||||
@inject NavigationManager nav;
|
@inject NavigationManager nav;
|
||||||
|
@attribute [Authorize]
|
||||||
|
|
||||||
|
|
||||||
<h1>Questions for '@SelectedItem.Name'</h1>
|
<h1>Questions for '@SelectedItem.Name'</h1>
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
@page "/settings/quizzes"
|
@page "/settings/quizzes"
|
||||||
@using FWLAZ_Web.Data
|
@using FWLAZ_Web.Data
|
||||||
|
@using Microsoft.AspNetCore.Authorization
|
||||||
@using Microsoft.EntityFrameworkCore
|
@using Microsoft.EntityFrameworkCore
|
||||||
@inject IDbContextFactory<LocalDbContext> DbFactory ;
|
@inject IDbContextFactory<LocalDbContext> DbFactory ;
|
||||||
|
@attribute [Authorize]
|
||||||
|
|
||||||
<h3>Quizzes</h3>
|
<h3>Quizzes</h3>
|
||||||
|
|
||||||
@ -25,7 +27,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ModalComponent @ref="modal">
|
<ModalDialog @ref="modal">
|
||||||
<Title>Löschen bestätigen</Title>
|
<Title>Löschen bestätigen</Title>
|
||||||
<Body>
|
<Body>
|
||||||
Willst du das Quiz wirklich löschen?
|
Willst du das Quiz wirklich löschen?
|
||||||
@ -34,11 +36,11 @@
|
|||||||
<button class="btn btn-danger" @onclick="DeleteItem">Ja</button>
|
<button class="btn btn-danger" @onclick="DeleteItem">Ja</button>
|
||||||
<button class="btn btn-primary" @onclick="CloseDialog">Nein</button>
|
<button class="btn btn-primary" @onclick="CloseDialog">Nein</button>
|
||||||
</Footer>
|
</Footer>
|
||||||
</ModalComponent>
|
</ModalDialog>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private LocalDbContext? DataContext;
|
private LocalDbContext? DataContext;
|
||||||
private ModalComponent modal = null!;
|
private ModalDialog modal = null!;
|
||||||
private Quiz? SelectedItem;
|
private Quiz? SelectedItem;
|
||||||
|
|
||||||
private List<Quiz> QuizList { get; set; } = new();
|
private List<Quiz> QuizList { get; set; } = new();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user