feat: Divi tools write library entries; global ones with dry run, confirm and backup (E2, F2)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -78,7 +78,6 @@ final class Plugin
|
||||
$libraryVisible = static function () use (&$policy): bool {
|
||||
return $policy instanceof ExposurePolicy && $policy->groupEnabled(LibraryAccess::GROUP);
|
||||
};
|
||||
$divi = new DiviIntegration($schema, $changeLog, libraryVisible: $libraryVisible);
|
||||
// Security M2: content-create's divi input follows lit/divi-insert (asked at execute time,
|
||||
// when registry and policy exist), so the Divi group's switches stop every Divi layout write.
|
||||
$diviWritable = static function () use (&$registry, &$policy): bool {
|
||||
@@ -86,6 +85,11 @@ final class Plugin
|
||||
&& $policy instanceof ExposurePolicy
|
||||
&& $policy->allows('lit/divi-insert', $registry->abilities());
|
||||
};
|
||||
// The Divi tools write to library entries only while the group "Divi-Bibliothek" may write (E9).
|
||||
$libraryWritable = static function () use (&$policy): bool {
|
||||
return $policy instanceof ExposurePolicy && $policy->groupWritable(LibraryAccess::GROUP);
|
||||
};
|
||||
$divi = new DiviIntegration($schema, $changeLog, $libraryWritable, libraryVisible: $libraryVisible);
|
||||
$registry = new IntegrationRegistry(
|
||||
new CoreIntegration(self::pluginDir() . '/docs/guides'),
|
||||
new WordPressIntegration($schema, $changeLog, $divi->contentComposer($diviWritable)),
|
||||
|
||||
Reference in New Issue
Block a user