asdasd
This commit is contained in:
@@ -50,9 +50,23 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$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' : 'Offen ohne Modulschutz');
|
||||
if ($hasSpecificAccess) {
|
||||
$accessParts = [];
|
||||
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']);
|
||||
$pendingMigrations = $migrationStatus['pending'] ?? [];
|
||||
$changedMigrations = $migrationStatus['changed'] ?? [];
|
||||
@@ -74,7 +88,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
</div>
|
||||
<div class="module-admin-meta__item">
|
||||
<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 class="module-admin-meta__item">
|
||||
<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.
|
||||
</div>
|
||||
<?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">
|
||||
<a class="nav-link" href="/module/<?= e($module['name']) ?>">Öffnen</a>
|
||||
<a class="nav-link" href="/modules/setup/<?= e($module['name']) ?>">Setup</a>
|
||||
|
||||
@@ -728,13 +728,18 @@ body.has-modal-open {
|
||||
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 {
|
||||
border-color: color-mix(in srgb, var(--brand-accent) 28%, var(--line));
|
||||
color: color-mix(in srgb, var(--brand-accent) 76%, var(--text));
|
||||
background: color-mix(in srgb, var(--brand-accent) 8%, transparent);
|
||||
}
|
||||
|
||||
.module-admin-access,
|
||||
.module-admin-warning {
|
||||
padding: 12px 14px;
|
||||
border-radius: 14px;
|
||||
@@ -742,12 +747,6 @@ body.has-modal-open {
|
||||
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 {
|
||||
color: color-mix(in srgb, var(--accent-orange) 86%, var(--text));
|
||||
background: color-mix(in srgb, var(--accent-orange) 10%, transparent);
|
||||
|
||||
Reference in New Issue
Block a user