BR-Nutzer (r-wiki-br ohne r-wiki) sehen in der Beitragsliste und im
Kategorie-Dropdown nur Beiträge und Kategorien, die ihren freigegebenen
Kategorien (betriebsrat_editable=1 + alle Nachfahren per BFS) zugeordnet sind.
Der Filter wird server-seitig in post_listform.php berechnet und als Parameter
an den Ajax-Endpunkt übergeben, da get_permission_state() im Ajax-Kontext
nicht verfügbar ist.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy-paste-Fehler: Berechtigung wurde doppelt gegen r-wiki geprüft statt
gegen r-wiki-br, wodurch BR-Nutzer den Speichern-Button nie sahen.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wenn eine Einrichtung mit hinterlegten Links ausgewählt wird, werden alle
verknüpften Einrichtungen (aus organigramm_einricht_link) automatisch
mitausgewählt. Gilt für alle 5 Einrichtungs-Multiselects (3× Semantic UI
Dropdown, 2× Tagify).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- categories_posts_listform.php: brCategoryFilter entfernt, Betriebsrat
sieht alle Kategorien (nur "Beitrag erstellen"-Button gefiltert)
- post_cardform_article.php: Bearbeiten- und "Neue Version"-Button jetzt
über \$canEditPost gesteuert statt hart auf r-wiki geprüft
- post_cardform.php: Settings-Tab-Link und -Inhalt ebenfalls über
\$canEditPost freigegeben
- post_cardform_settings.php: Kategorie-Whitelist wird für Betriebsrat
auf freigegebene Kategorien gefiltert (inkl. Vererbung);
Speichern-Button und JS-Handler über \$canEditPost gesteuert
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- is_category_betriebsrat_editable(): läuft den Kategoriebaum nach oben durch
(via knowledgecenter_category_links), sodass Unterkategorien einer
freigegebenen Kategorie automatisch ebenfalls als editierbar gelten
- ajax_is_category_editable_for_br(): gleiche Logik für den Ajax-Kontext
- ajax_can_edit_post(): nutzt jetzt Vererbung statt direkter Kategorienprüfung
- create_post_draft(): ajax_has_wiki_edit()-Check hinzugefügt
- update_post_version(): Permission-Check mit Sonderfall neue Drafts (noch
keine Kategorien → Prüfung auf has_wiki_edit begrenzt)
- update_post_categories(): Betriebsrat darf nur freigegebene Kategorien
(inkl. Vererbung) zuweisen
- upload_inline_image.php: Bild-Upload prüft ebenfalls den Kategoriebaum
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Neue Permission r-wiki-br ermöglicht eingeschränkte Wiki-Bearbeitung:
- Neue Permission in main_permission (ID 30: r-wiki-br)
- Neue Spalte betriebsrat_editable in knowledgecenter_categories_update
- Checkbox "Für Betriebsrat bearbeitbar" in der Kategorie-Verwaltung
(nur für r-wiki-Redakteure sichtbar und speicherbar)
Berechtigungslogik:
- r-wiki schlägt immer: Wer beide Rechte hat, verhält sich wie Redakteur
- Betriebsrat sieht nur Kategorien mit betriebsrat_editable=1
- "Beitrag erstellen"-Button nur in freigegebenen Kategorien sichtbar
- Neue Posts/Bearbeitungen auf betriebsrat_editable-Kategorien beschränkt
- Settings-Tab und Kategorieverwaltung weiterhin r-wiki-only
- Ajax-Endpoints (save_post_files, delete_post_file, upload_inline_image)
prüfen Kategorie-Berechtigung serverseitig
File Gallery:
- Betriebsrat ist per kc_lock_path auf den Post-eigenen Ordner beschränkt
- Redakteur kann frei navigieren (kein Lock)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pdfparser scheitert an "secured" PDFs (Kopier-Schutz ohne Passwort).
pdftotext aus poppler-utils umgeht diesen Schutz und extrahiert den
eingebetteten Text korrekt. Falls pdftotext nicht verfügbar ist oder
nichts liefert, bleibt pdfparser als Fallback erhalten.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
get_article_files() filterte nur sitepart_id=5, obwohl PDFs auch über
sitepart_id=6 und 10 verknüpft sind. Direkter JOIN auf filegallery_line
mit IN (5,6,10) findet jetzt alle Anhänge korrekt.
Außerdem: Token-sparsamere generate_summary-Logik (Teaser priorisiert,
Text auf 1500 Z. gecappt, nur 1 PDF á 800 Z., maxOutputTokens=150),
--summaries-only-Flag für Nachläufe, sleep(4) für Free-Tier-Rate-Limit.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ALTER TABLE knowledgecenter_post_versions ADD COLUMN summary TEXT NULL AFTER content
- Add summary textarea to post edit form (after Quill editor)
- Include summary in insert_post_version() and update_post_version()
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The forum module (topic table) does not exist. Remove the comment count
query to prevent a fatal crash when loading a post detail page.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Create module/shared_components/quill/ with toolbar_presets.js,
quill_resize.js and quill_resize.css — missing files caused a JS crash
in $(document).ready() before the save button's click handler was
registered, so clicking save did nothing
- Fix filesgallery.php session detection to search any sid* cookie
dynamically (site session name is 'sidawo', not the hardcoded
'sidintranet'), fixing the popup showing the homepage instead of
the gallery
- Revert categories_cardform.php from 3-tab layout back to original
sidebar layout with full-width permissions section below
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- post_cardform.php: remove Diskussion tab (forum module doesn't exist)
- post_cardform_contacts.php: guard get_contact_cards AJAX so it doesn't
fire with post_id=0 on new posts (caused "Ungültige Beitrags-ID" error)
- post_cardform_settings.php: remove Produkte section entirely — the
product/product_translation tables don't exist in this installation,
which caused a fatal crash when opening the settings tab
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
categories_cardform.php now uses a 3-tab layout (Allgemein / Berechtigungen /
Unterkategorien) instead of a content+sidebar layout. The permissions section
spans full width with a 6-column grid: Mandanten/Abteilungen/Rollen each in
2 cols, Einrichtungen/Fachbereiche each in 3 cols for more space.
post_cardform.php: the Diskussion tab crashed with a fatal require_once when
the forum module doesn't exist. Now guarded with file_exists() and shows a
placeholder message for new posts and missing modules.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
categories_cardform.php now loads and displays tagify pickers for
Einrichtungen and Fachbereiche alongside the existing Mandant/Abteilung/Rolle
pickers. The saveTagifyData() function passes all 5 types to update_category_links.
Also ran DB migration: all permission data from the 5 old _link tables has been
copied into the new permission tables (mandant: 178, department: 1108,
role: 2159, einricht: 10023, fachbereich: 2722 rows).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The new tasks and knowledgecenter_update modules were built against a
main_contact_link table that does not exist in this system. All 7 active
query sites now target main_contact_department (same column names,
active_d → active).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>