asdasd
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-04 01:12:05 +02:00
parent 33119f66f7
commit f5b30d6991
2 changed files with 24 additions and 26 deletions

View File

@@ -50,9 +50,23 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$authUsers = is_array($auth['users'] ?? null) ? array_filter($auth['users']) : []; $authUsers = is_array($auth['users'] ?? null) ? array_filter($auth['users']) : [];
$authGroups = is_array($auth['groups'] ?? null) ? array_filter($auth['groups']) : []; $authGroups = is_array($auth['groups'] ?? null) ? array_filter($auth['groups']) : [];
$hasSpecificAccess = $authRequired && ($authUsers !== [] || $authGroups !== []); $hasSpecificAccess = $authRequired && ($authUsers !== [] || $authGroups !== []);
$accessLabel = $hasSpecificAccess if ($hasSpecificAccess) {
? 'Spezielle Zugriffsrechte' $accessParts = [];
: ($authRequired ? 'Login erforderlich' : 'Offen ohne Modulschutz'); if ($authGroups !== []) {
$accessParts[] = 'Gruppen: ' . implode(', ', $authGroups);
}
if ($authUsers !== []) {
$accessParts[] = 'Nutzer: ' . implode(', ', $authUsers);
}
$accessLabel = implode(' · ', $accessParts);
$accessClass = ' module-admin-badge--success';
} elseif ($authRequired) {
$accessLabel = 'Login erforderlich';
$accessClass = ' module-admin-badge--warning';
} else {
$accessLabel = 'Offen ohne Modulschutz';
$accessClass = ' module-admin-badge--danger';
}
$migrationStatus = modules()->migrationStatus($module['name']); $migrationStatus = modules()->migrationStatus($module['name']);
$pendingMigrations = $migrationStatus['pending'] ?? []; $pendingMigrations = $migrationStatus['pending'] ?? [];
$changedMigrations = $migrationStatus['changed'] ?? []; $changedMigrations = $migrationStatus['changed'] ?? [];
@@ -74,7 +88,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
</div> </div>
<div class="module-admin-meta__item"> <div class="module-admin-meta__item">
<span class="module-admin-meta__label">Zugriff</span> <span class="module-admin-meta__label">Zugriff</span>
<strong class="module-admin-badge<?= $hasSpecificAccess ? ' module-admin-badge--warning' : '' ?>"><?= e($accessLabel) ?></strong> <strong class="module-admin-badge<?= e($accessClass) ?>"><?= e($accessLabel) ?></strong>
</div> </div>
<div class="module-admin-meta__item"> <div class="module-admin-meta__item">
<span class="module-admin-meta__label">Migrationen</span> <span class="module-admin-meta__label">Migrationen</span>
@@ -86,21 +100,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
Achtung: <?= e((string)count($changedMigrations)) ?> bereits angewendete Migration(en) wurden verändert. Achtung: <?= e((string)count($changedMigrations)) ?> bereits angewendete Migration(en) wurden verändert.
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if ($hasSpecificAccess || $authRequired): ?>
<div class="module-admin-access">
<?php if ($authGroups !== []): ?>
Gruppen: <?= e(implode(', ', $authGroups)) ?>
<?php elseif ($authRequired): ?>
Anmeldung erforderlich
<?php endif; ?>
<?php if ($authGroups !== [] && $authUsers !== []): ?>
·
<?php endif; ?>
<?php if ($authUsers !== []): ?>
Benutzer: <?= e((string)count($authUsers)) ?>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="module-admin-actions"> <div class="module-admin-actions">
<a class="nav-link" href="/module/<?= e($module['name']) ?>">Öffnen</a> <a class="nav-link" href="/module/<?= e($module['name']) ?>">Öffnen</a>
<a class="nav-link" href="/modules/setup/<?= e($module['name']) ?>">Setup</a> <a class="nav-link" href="/modules/setup/<?= e($module['name']) ?>">Setup</a>

View File

@@ -728,13 +728,18 @@ body.has-modal-open {
background: color-mix(in srgb, var(--accent-orange) 8%, transparent); background: color-mix(in srgb, var(--accent-orange) 8%, transparent);
} }
.module-admin-badge--danger {
border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
color: color-mix(in srgb, var(--accent) 80%, var(--text));
background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.module-admin-badge--accent { .module-admin-badge--accent {
border-color: color-mix(in srgb, var(--brand-accent) 28%, var(--line)); border-color: color-mix(in srgb, var(--brand-accent) 28%, var(--line));
color: color-mix(in srgb, var(--brand-accent) 76%, var(--text)); color: color-mix(in srgb, var(--brand-accent) 76%, var(--text));
background: color-mix(in srgb, var(--brand-accent) 8%, transparent); background: color-mix(in srgb, var(--brand-accent) 8%, transparent);
} }
.module-admin-access,
.module-admin-warning { .module-admin-warning {
padding: 12px 14px; padding: 12px 14px;
border-radius: 14px; border-radius: 14px;
@@ -742,12 +747,6 @@ body.has-modal-open {
line-height: 1.45; line-height: 1.45;
} }
.module-admin-access {
color: var(--muted);
background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
border: 1px solid var(--line);
}
.module-admin-warning { .module-admin-warning {
color: color-mix(in srgb, var(--accent-orange) 86%, var(--text)); color: color-mix(in srgb, var(--accent-orange) 86%, var(--text));
background: color-mix(in srgb, var(--accent-orange) 10%, transparent); background: color-mix(in srgb, var(--accent-orange) 10%, transparent);