fix: library IDs stay hidden without library access (ruling P13)
Outline, node-get, write outlines, the render summary and replace-text's opaque-node match name no library ID unless the library group is visible and the user has divi_library; read-only still names them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -130,13 +130,22 @@ final class DiviNodeGetAbility implements Ability
|
||||
$version = $block->attrs()['builderVersion'] ?? null;
|
||||
|
||||
$global = NodeSummary::globalRef($block);
|
||||
if ($global !== null) {
|
||||
if ($global !== null && $this->loader->libraryIdsVisible()) {
|
||||
$global['hint'] = sprintf(
|
||||
'Globales Modul: Inhalt im Bibliothekseintrag %s bearbeiten (lit-divi-outline mit post_id %s); '
|
||||
. 'jede Änderung dort wirkt auf alle Seiten mit diesem Modul.',
|
||||
$global['id'],
|
||||
$global['id']
|
||||
);
|
||||
} elseif ($global !== null) {
|
||||
// Ruling P13: which entry is shown stays unknown without library access (AttrMap::flatten
|
||||
// already leaves globalModule/globalParent out of attrs).
|
||||
$global = [
|
||||
'id' => null,
|
||||
'block_name' => $global['block_name'],
|
||||
'hint' => 'Globales Modul aus der Divi-Bibliothek – nur lesbar; dieses Konto hat keinen Zugang zur '
|
||||
. 'Divi-Bibliothek.',
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user