mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 08:09:18 +02:00
- Skip required-field validation for orientation/ap/finality/licence/jury in admin add+edit
5.7 KiB
5.7 KiB
XAMXAM TODO
Completed
-
TDD analysis + new test suites
- Bug fixed:
SearchController::handleSearch()—$coverMapundefined variable + never populated for search results ShareLinkTest(13 tests) —generateSlug, allvalidateLinkbranches,verifyPassword,incrementUsage,objet_restrictionPureLogicTest(31 tests) —TfeControllerhelpers (meta, OG image, jury split, captions),ThesisCreateControllerhelpers (autofocus, detectFileType, authorSlug),ThesisEditController::buildFileSizeInfo,ExportControllerCSV column consistency,SearchControllercoverMap regression- Private helpers promoted to
protectedinTfeController,ThesisCreateController,ThesisEditControllerto enable subclass-based testing without reflection
- Bug fixed:
-
Form save audit + TDD
createThesis()missingduration_pages/duration_minutescolumns — fixedThesisCreateControllernot passing raw page/minute values tocreateThesis()— fixed (durationPages,durationMinutesextracted and passed)FormSaveTest.php— 14 red-green tests covering create+edit round-trips for all fields
-
Language form improvements
- Add Néerlandais as default language option (schema + migration 017)
language_autreconditionally required via HTMX fragment (replaced custom JS)language_autresaved viagetOrCreateLanguage()in both create and edit controllersformData['languages']wired in edit.php so checkboxes are pre-checkedduration_pages/duration_minutessaved inupdateThesis()and read back ingetThesisRawFields()beforeunload-guardapplied to add and partage forms too
-
Audit + fix direct PHP URL references blocked by nginx catch-all
deny all/request-access.phpfetch intfe.php→/request-access/media.php?path=inform.php(×2) andadmin/recapitulatif.php→/media?path=
-
Fix 403 on
/language-autre-fragment.phpfromedit.php- Root cause: standalone root-level PHP file blocked by nginx catch-all
deny all - Moved logic to
partage/language-autre-fragment.php(shared include) - Added route
/partage/language-autre-fragmentinpartage/index.php - Added
admin/language-autre-fragment.php(AdminAuth gated, includes shared logic) form.phppicks URL based on$mode(partagevs admin)- Deleted
public/language-autre-fragment.php; nginx unchanged
- Root cause: standalone root-level PHP file blocked by nginx catch-all
-
Merge banner images into cover images
- Migration 016: copy
storage/banners/*→storage/covers/, insertthesis_filescover records, clearbanner_path, remove banners dir - Remove banner fieldset from edit form (
form.php) - Remove banner fieldset from student submission form (
fieldset-files.php: rename to couverture) - Update
ThesisEditController::save()— remove banner upload/removal logic - Update
ThesisCreateController::submit()— removehandleBannerUploadcall - Update
Database::handleCoverUpload()— add webp support, raise limit to 20 MB - Remove
Database::setBannerPath(),handleBannerUpload(),getThesisBannerPath() - Update
Database::deleteThesis()/bulkDeleteTheses()— remove banner file cleanup HomeController: batch-load covers for all items, remove banner_path fallbackSearchController::handleSearch(): batch-load covers, pass$coverMapto viewSearchController::handleStudentPreview(): load covers, pass$coverMapto partialTfeController::resolveOgImage(): use cover file_type instead of banner_pathhome.php: use only$coverMap(no banner_path fallback)search.php: show cover thumbnail on result cardsstudent-preview.php: use$coverMapinstead ofbanner_path- Migration applied and file moved to
applied/
- Migration 016: copy
-
Remove
requiredfrom all form inputs in admin add/edit- Introduced
$adminModeflag inform.php(true when$modeis'add'or'edit') - Hidden "champs obligatoires" note in admin mode
- All
$required = truecallers inform.php,fieldset-tfe-info.php,fieldset-academic.php,fieldset-licence-explanation.php,fieldset-files.phpchanged to!$adminMode - Hardcoded
requiredHTML attributes infieldset-tfe-info.php(synopsis, objet radios),fieldset-licence-explanation.php(access type radios),jury-fieldset.php(promoteur, lecteurs interne/externe) gated on!$adminMode - Dynamic JS
ulbInput.requiredin jury fieldset also gated - Remove server-side validation for orientation, ap, finality, licence, jury roles in
ThesisEditController::save()— admins can save partial records - Same for
ThesisCreateController::submit(): added$adminModeparam, passtruefromadmin/actions/formulaire.php
- Introduced
-
Encrypt SMTP password at rest (AES-256-GCM)
app/.env— holdsAPP_KEY(base64, 32 bytes); added to.gitignoresrc/Crypto.php—encrypt()/decrypt()/isEncrypted()via OpenSSL AES-256-GCMSmtpRelay::getSettings()— decrypts password after DB fetchSmtpRelay::updateSettings()— encrypts password before DB writeparametres.phptemplate — password field no longer pre-filled (ciphertext never sent to browser)- Migration
018_encrypt_smtp_password.php— encrypted existing plaintext in DB; moved to applied/ justfile—deploycallsdeploy-env(uploads.envonly if remote doesn't exist yet)justfile—deploy-envrecipe: safe upload with guardsjustfile—reencrypt-passwordrecipe: rotates APP_KEY on remote DBscripts/reencrypt-smtp-password.php— decrypts with old key, re-encrypts with new key, updates.env