feat: add directory opt-out sync and layout/xss seed data extensions
This commit is contained in:
@@ -659,6 +659,24 @@ async function createAnnouncements(context: SeedContext) {
|
||||
},
|
||||
});
|
||||
|
||||
const longTitle = await prisma.announcement.create({
|
||||
data: {
|
||||
kitaId: kita.id,
|
||||
title: "Dies ist eine extrem lange Ankuendigung mit einem superlangen Titel um das Layout des Dashboards und des Schwarzen Bretts auf korrekten Textumbruch und Mobilfreundlichkeit zu testen",
|
||||
content: "Inhalt der superlangen Ankuendigung fuer Layout-Testing.",
|
||||
authorId: admin.id,
|
||||
},
|
||||
});
|
||||
|
||||
const xssTitle = await prisma.announcement.create({
|
||||
data: {
|
||||
kitaId: kita.id,
|
||||
title: "Boesartiger Titel mit <script>alert('XSS_NEWS_TITLE')</script> HTML Tags",
|
||||
content: "Dieser Beitrag testet, ob die Anwendung XSS-Angriffe im Titel oder im Inhalt filtert. <script>alert('XSS_NEWS_CONTENT')</script>",
|
||||
authorId: admin.id,
|
||||
},
|
||||
});
|
||||
|
||||
await prisma.attachment.create({
|
||||
data: {
|
||||
announcementId: sommerfest.id,
|
||||
@@ -808,6 +826,41 @@ async function createTermine(
|
||||
},
|
||||
});
|
||||
|
||||
const highDensityDay = addDays(now, 7);
|
||||
for (let i = 1; i <= 8; i++) {
|
||||
await prisma.termin.create({
|
||||
data: {
|
||||
kitaId: kita.id,
|
||||
title: `Parallel-Termin #${i}`,
|
||||
description: `Beschreibung fuer Parallel-Termin #${i}`,
|
||||
type: TerminType.SONSTIGES,
|
||||
status: TerminStatus.CONFIRMED,
|
||||
startDate: highDensityDay,
|
||||
endDate: highDensityDay,
|
||||
allDay: false,
|
||||
createdById: admin.id,
|
||||
approvedById: admin.id,
|
||||
approvedAt: now,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
await prisma.termin.create({
|
||||
data: {
|
||||
kitaId: kita.id,
|
||||
title: "Boesartiger Termin <script>alert('XSS_CAL_TITLE')</script>",
|
||||
description: "XSS Test im Terminkalender <script>alert('XSS_CAL_DESC')</script>",
|
||||
type: TerminType.SONSTIGES,
|
||||
status: TerminStatus.CONFIRMED,
|
||||
startDate: addDays(now, 5),
|
||||
endDate: addDays(now, 5),
|
||||
allDay: true,
|
||||
createdById: admin.id,
|
||||
approvedById: admin.id,
|
||||
approvedAt: now,
|
||||
},
|
||||
});
|
||||
|
||||
await prisma.mitbringselItem.createMany({
|
||||
data: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user