link creation: fieldset with checkboxes for objet restriction, TFE checked by default

link creation: fieldset with checkboxes for objet restriction, TFE checked by default; password/expiration in second fieldset 'Accès'
This commit is contained in:
Pontoporeia
2026-05-09 16:11:11 +02:00
parent 21c2b55bfb
commit 013317c97f
5 changed files with 37 additions and 39 deletions

View File

@@ -249,8 +249,8 @@ function renderShareLinkForm(string $slug, array $link): void
// Determine allowed objet values for this link
$siteSettings = Database::getInstance()->getAllSettings();
$objetRestriction = $link['objet_restriction'] ?? null;
if ($objetRestriction !== null) {
$allowedObjet = [$objetRestriction];
if ($objetRestriction !== null && $objetRestriction !== '') {
$allowedObjet = explode(',', $objetRestriction);
} else {
$allowedObjet = ['tfe'];
if (($siteSettings['objet_these_enabled'] ?? '1') === '1') $allowedObjet[] = 'thèse';