feat: lit-library-insert as copy or global instance in the builder's format (E5)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -148,6 +148,16 @@ class LibraryAccess
|
||||
return $this->roles->refusal('edit_global_library');
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserting from the library into a page (E3): canList(), the role option add_library (Divi's
|
||||
* "Aus der Bibliothek hinzufügen") and a group "Divi-Bibliothek" that is not read-only or
|
||||
* disabled (E9). Reading the entry itself stays item() (ruling P5).
|
||||
*/
|
||||
public function canInsert(): ?WP_Error
|
||||
{
|
||||
return $this->canList() ?? $this->roles->refusal('add_library') ?? $this->writableGate();
|
||||
}
|
||||
|
||||
/** Refusal while the Tools tab keeps this connection from writing to the library. */
|
||||
public function writableGate(): ?WP_Error
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user