- πΊπΈUnited States jeffm2001
I ran into an issue around this as well, and while I tend to agree it's too opinionated, I did find the original discussion of why these checks were added. It seems like useful context to have, if nothing else.
#3038254: Delegate media library access to the "thing" that opened the library β starting around comment 62
- πΈπͺSweden erik.erskine
We've come up against two cases where a user should quite legitimately be able to use the media library but does not have the create access: group and layout builder.
I am interested in why
checkAccessexists at all. As far as I can tell, it doesn't add anything useful. Especially given that whileMediaLibraryFieldWidgetOpenerconsiders the entity/bundle you're working on,MediaLibraryEditorOpener(used for ckeditor-added media) does not, and in fact does not even know what the entity/bundle are.As a workaround, we have created the Media library unrestricted access β sandbox module. It defines a unrestricted access to the media library permission and bypasses the
createAccesscheck if the user has that permission. It's one stop short of the change this issue proposes, but could be a useful workaround in the meantime.