enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
201 stars 34 forks source link

MediaSelector doesn't respect <allowContentTypes> #7889

Closed tajakobsen closed 4 years ago

tajakobsen commented 4 years ago

This issue has been found in Enonic XP 7.2.1 on Ubuntu.

I have the following xml:

<input name="reports" type="MediaSelector">
  <label>Related reports and documents</label>
  <occurrences minimum="0" maximum="50" />

  <config>
    <allowContentTypes>media:document</allowContentTypes>
    <treeMode>true</treeMode>
    <showStatus>true</showStatus>
    <hideToggleIcon>true</hideToggleIcon>
  </config>
</input>

I wanted to only be able to select content of type media:document.

But when adding content, Images (of type media:image) show up in the picker, and I can select the images.

alansemenov commented 4 years ago

Looks like a bug. Thanks for reporting this.

vbradnitski commented 4 years ago

Issue moved to enonic/doc-xp #121 via ZenHub