Skip to content

denying access in query presets results in error 500 #12186

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

Open
tylkomat opened this issue Apr 22, 2025 · 0 comments
Open

denying access in query presets results in error 500 #12186

tylkomat opened this issue Apr 22, 2025 · 0 comments
Labels
status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@tylkomat
Copy link

Describe the Bug

When denying access to the query presets the "select preset" button does not disappear. Upon clicking it the popup to select a query preset opens empty and then closes. The console prints the following error:

POST /admin/collections/posts?limit=10 500 in 374ms
 ⨯ Error: not-found
    at renderListView (packages\next\src\views\List\index.tsx:81:10)
    at renderListHandler (packages\next\src\views\List\handleServerFunction.tsx:135:40)
    at async Server.<anonymous> (test\dev.ts:125:4)
  79 |
  80 |   if (!permissions?.collections?.[collectionSlug]?.read) {
> 81 |     throw new Error('not-found')
     |          ^
  82 |   }
  83 |
  84 |   const query = queryFromArgs || queryFromReq {
  digest: '339678479'
}

Link to the code that reproduces this issue

https://github.com/tylkomat/payload/tree/bug-query-presets-access-denied

Reproduction Steps

Visit posts collection and click on "select preset".

Which area(s) are affected? (Select all that apply)

area: core, area: ui

Environment Info

Payload: 3.35.1
NextJs: 15.3.0
Nodejs: 20.12.2
@tylkomat tylkomat added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. labels Apr 22, 2025
@github-actions github-actions bot removed the validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. label Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
Development

No branches or pull requests

1 participant