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

This commit is contained in:
2026-04-14 22:38:11 +02:00
parent da9a6841e4
commit 3e9fa3d4a1

View File

@@ -40,14 +40,42 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<div style="margin-top:1rem;" class="grid"> <div style="margin-top:1rem;" class="grid">
<?php foreach ($modules as $module): ?> <?php foreach ($modules as $module): ?>
<?php if (empty($module['enabled'])) { continue; } ?> <?php if (empty($module['enabled'])) { continue; } ?>
<?php
$auth = is_array($module['auth'] ?? null) ? $module['auth'] : [];
$authRequired = !empty($auth['required']);
$authUsers = is_array($auth['users'] ?? null) ? array_filter($auth['users']) : [];
$authGroups = is_array($auth['groups'] ?? null) ? array_filter($auth['groups']) : [];
$hasSpecificAccess = $authRequired && ($authUsers !== [] || $authGroups !== []);
$accessLabel = $hasSpecificAccess
? 'Spezielle Zugriffsrechte'
: ($authRequired ? 'Login erforderlich' : 'Kein Modulschutz');
?>
<div class="card" style="background:var(--panel-2);"> <div class="card" style="background:var(--panel-2);">
<div style="display:flex; align-items:center; justify-content:space-between; gap:12px;"> <div style="display:flex; align-items:center; justify-content:space-between; gap:12px;">
<div> <div>
<strong><?= e($module['title']) ?></strong> <strong><?= e($module['title']) ?></strong>
<div class="muted" style="font-size:.85rem;"><?= e($module['description'] ?? '') ?></div> <div class="muted" style="font-size:.85rem;"><?= e($module['description'] ?? '') ?></div>
</div> </div>
<span class="pill" style="border-color:var(--accent-2); color:var(--accent-2);">aktiv</span> <div style="display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end;">
<span class="pill" style="border-color:var(--accent-2); color:var(--accent-2);">aktiv</span>
<span class="pill" title="<?= e($accessLabel) ?>" style="<?= $hasSpecificAccess ? 'border-color:#f59e0b; color:#fbbf24;' : '' ?>">
<?= e($accessLabel) ?>
</span>
</div>
</div> </div>
<?php if ($hasSpecificAccess): ?>
<div class="muted" style="margin-top:.65rem; font-size:.85rem;">
<?php if ($authGroups !== []): ?>
Gruppen: <?= e(implode(', ', $authGroups)) ?>
<?php endif; ?>
<?php if ($authGroups !== [] && $authUsers !== []): ?>
·
<?php endif; ?>
<?php if ($authUsers !== []): ?>
Benutzer: <?= e((string)count($authUsers)) ?>
<?php endif; ?>
</div>
<?php endif; ?>
<div style="margin-top:.75rem; display:flex; gap:10px; flex-wrap:wrap;"> <div style="margin-top:.75rem; display:flex; gap:10px; flex-wrap:wrap;">
<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>