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

Image can be added to root of Media when AllowAtRoot is false #7672

Closed
stuartc-sindraksi opened this issue Feb 17, 2020 · 7 comments · Fixed by #7852 or #7853
Closed

Image can be added to root of Media when AllowAtRoot is false #7672

stuartc-sindraksi opened this issue Feb 17, 2020 · 7 comments · Fixed by #7852 or #7853

Comments

@stuartc-sindraksi
Copy link

Images can be added to the root of the media section even when the AllowAtRoot Property is set to false.

Umbraco version

I am seeing this issue on Umbraco version: 8.5.3 (also seen in 8.3.0)

Reproduction

Steps to reproduce

  1. Set the Image Media Types AllowAtRoot property to false in Setting>Media Types>Image
  2. Create a Doc Type a Media Picker property on it and create and node with this Doc Type
  3. Use the Media Picker
  4. Click upload while viewing the root. This will not open the file upload window
  5. Create a new media folder
  6. Click into the folder
  7. Click to return to the root
  8. Click upload while viewing the root. This will open the file upload window

Expected result

Clicking upload should not open a the file upload window if they are viewing the root, and a warning message should inform the user that images are not allowed at the root.

Actual result

Clicking the upload button provides no warning message and the file upload window opens

@nul800sebastiaan nul800sebastiaan added state/needs-reproduction Check if this can be reproduced in the latest released version type/bug community/up-for-grabs and removed state/needs-reproduction Check if this can be reproduced in the latest released version labels Feb 17, 2020
@nul800sebastiaan
Copy link
Member

Thanks @stuartc-sindraksi - we reproduced the bug.

There's also the dropzone to consider when you have root access. So there should be an error when you upload a file of the wrong mediatype. It could be that files not of type image are still allowed.

At this point we'd be happy for some help with getting this fixed, if you are so inclined!

@umbrabot
Copy link

Hi @stuartc-sindraksi,

We're writing to let you know that we've added the Up For Grabs label to your issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post

Thanks muchly, from your friendly PR team bot :-)

@olibos
Copy link
Contributor

olibos commented Mar 28, 2020

@mmrauta You were faster on this one ;-) 👍

@mmrauta
Copy link
Contributor

mmrauta commented Mar 28, 2020

@mmrauta You were faster on this one ;-) 👍

@olibos we were almost at the same time! Knowing you would fix it the same way reassures me that it's a good resolution.

I was also considering adding the message, similar to the one I saw for noDocumentTypesAllowedAtRootThere key:

There are no allowed document types available for creating content here. You must enable these in Document Types within the Settings section, by changing the Allow as root option under Permissions.

I could add noMediaTypesAllowedAtRootThere key:

There are no allowed image types available for uploading here. You must enable these in Media Types within the Settings section, by changing the Allow as root option under Permissions.

But not knowing how to correctly add new multilanguage text I abandoned this idea...
Maybe I should still add it, what do you think? I'm only afraid this could give a wrong impression, that user cannot upload images in the subfolders as well...

But for future reference. could anyone please explain, how should we add new multilingual messages/labels?

@olibos
Copy link
Contributor

olibos commented Mar 29, 2020

Hello @mmrauta , I've added your suggestion what do you think?

@nul800sebastiaan
Copy link
Member

Fixed in #7852

@nul800sebastiaan
Copy link
Member

And additional fixing in #7672 👍

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