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:
@@ -166,4 +166,18 @@ final class LibraryAccessTest extends TestCase
|
||||
self::assertToolError(LibraryFixtures::access(['edit_global_library'])->canSave(true), 'forbidden');
|
||||
self::assertNull(LibraryFixtures::access()->canSave(true));
|
||||
}
|
||||
|
||||
/** Inserting from the library (E3): canList(), Divi's add_library and a group that is not read-only. */
|
||||
public function testInsertingNeedsAddLibrary(): void
|
||||
{
|
||||
LibraryFixtures::given([]);
|
||||
|
||||
self::assertNull(LibraryFixtures::access()->canInsert());
|
||||
self::assertToolError(LibraryFixtures::access(['add_library'])->canInsert(), 'forbidden');
|
||||
self::assertToolError(LibraryFixtures::access(['divi_library'])->canInsert(), 'forbidden');
|
||||
self::assertToolError(LibraryFixtures::access([], false)->canInsert(), 'forbidden');
|
||||
|
||||
LibraryFixtures::given([], ['edit_posts']);
|
||||
self::assertToolError(LibraryFixtures::access()->canInsert(), 'forbidden');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user