umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.4k stars 2.66k forks source link

ApiError The authenticated user do not have access to this resource when accessing a media folder #16796

Closed gucluoz closed 1 month ago

gucluoz commented 1 month ago

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

14.0.0

Bug summary

Hi, With a clean build & deployment of Umbraco 14 a non-administrator user with only "Media" section access right gets "ApiError The authenticated user do not have access to this resource" ApiError while trying to browse a media folder which is set as start node.

Error is raised from an ajax request to resource : umbraco/management/api/v1/data-type/3a0156c4-3b8c-4803-bdc1-6871faa83fff

If Settings section access right is added to the relevant user group, Ajax call returns with success and the user interface is fully functional with "List View - Media" data type.

Not sure if this is by design yet seems to be a bug.

umb1

Specifics

Steps to reproduce

  1. Create a media folder named "Document Library"
  2. Add a user group with :
    • Sections : Media
    • Allow access to all languages
    • Media start node : "Document Library"
    • Permissions : ALL (doesn't change the result)
  3. Add a user with :
    • Groups : [Group created above]
  4. Login with newly created user
  5. Error pops up

Expected result / actual result

Expected result : List View - Media control should be visible and contents of the media folder is displayed Actual result : Error window pops up, List View - Media control is not loaded image


This item has been added to our backlog AB#42485

github-actions[bot] commented 1 month ago

Hi there @gucluoz!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:

elit0451 commented 1 month ago

Hi @gucluoz 👋

Thanks for reaching out! I managed to reproduce the issue, we will have a look 😊

iOvergaard commented 1 month ago

I can testify that it's an issue. It works if you give the user group access to the "Content" section in addition to the "Media" section. I realize it's not the best solution, but it could solve it temporarily.

elit0451 commented 1 month ago

Fixed in #16865