Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict access to Media Library #34

Open
critterverse opened this issue Apr 26, 2022 · 5 comments
Open

Restrict access to Media Library #34

critterverse opened this issue Apr 26, 2022 · 5 comments
Labels
enhancement New feature or request priority: low

Comments

@critterverse
Copy link

I wonder if we should restrict access to the Media Library, which is accessible from the “Replace” action in the Image block toolbar. Maybe we could limit the replacement option to be uploads only:

Screen Shot 2022-04-26 at 5 07 40 PM

If we do want to keep the Media Library option, we should make sure that the images are loading and that it's also using the "Modern" admin color scheme (not the classic blue). This is what I'm seeing currently:

Screen Shot 2022-04-26 at 5 22 31 PM

@StevenDufresne
Copy link
Collaborator

Thanks for opening this ticket!

The media library is locked down, user uploads do not actually get saved although they appear as such. In terms of the media library it's broken on the test site because of some hard code here:

$query['post__in'] = range( 97654, 97659 );

When we move this to the right place, it should work although this implementation is obviously not ideal. I'll look into getting a more modern view.

@StevenDufresne
Copy link
Collaborator

I looked into setting up the modern theme for the media window. I'm going to set this as low priority because even if we do set it properly, it isn't applied cleanly:

The buttons get the right styles but the rest is still the default color. We could target the button specifically and style it if necessary.

@StevenDufresne StevenDufresne added enhancement New feature or request priority: low labels Apr 28, 2022
@critterverse
Copy link
Author

critterverse commented Apr 28, 2022

Thanks for looking into this! My first preference would probably be to restrict access entirely (since the Media Library is not very Gutenberg-y and maybe not something we'd want to showcase as our latest and greatest UI).

But loading it with the exisiting images on the page also works, espeically if we can target specific components to make them match the Modern blue color. Thank you!

@StevenDufresne
Copy link
Collaborator

We need some sort of library for users to test out the image block. I'm not sure everyone would be comfortable uploading an image from their own computer. I also think we should consider turning on OpenVerse. We are currently doing that for the pattern directory.

@beafialho
Copy link

I also think we should consider turning on OpenVerse. We are currently doing that for the pattern directory.

I agree, Openverse seems like a good option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: low
Projects
None yet
Development

No branches or pull requests

3 participants