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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

V8; Support allowed types for MNTP media picker #6519

Merged

Conversation

kjac
Copy link
Contributor

@kjac kjac commented Oct 1, 2019

Prerequisites

  • I have added steps to test this contribution in the description below

Description

As-is you can pick the allowed types when configuring MNTP as a media picker. However, the picker doesn't respect the allowed types filtering like it does when configured as a content picker. This was uncovered while working on #5983 (see also this comment on the PR fixing #5983)

This PR implements the filtering; when it's applied here's how the MNTP works in media picker mode:

mntp-media-allowed-types

...and it also works when you browse around the media library in the picker 馃槃

mntp-media-allowed-types-2

Testing this PR

To test this:

  1. Create a new media type (easiest to clone the default "media" one)
  2. Create media of multiple types
  3. Configure MNTP as a media picker and only allow one of the media types
  4. Verify that the MNTP only lets you pick media of the allowed type
  5. Do the same for multiple allowed media types
  6. Remove the constraints on allowed media types and verify that the MNTP indeed allows you to pick any type

@nul800sebastiaan
Copy link
Member

Oooh 馃榿

@nul800sebastiaan nul800sebastiaan merged commit 0d3e330 into umbraco:v8/dev Oct 14, 2019
@nul800sebastiaan
Copy link
Member

Lovely, works as advertised! 馃憤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants