Skip to content

Query by publishDate is not working #702

Answered by DanRibbens
Stupidism asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @Stupidism,

I'm glad to see you are exploring this solution more. Looking at the code for the access control, it is doing exactly what you're asking it to.
The access control on TestDrafts for read first checks if a user is logged in before querying publishDate. Unless you have logged out it won't bother querying the way you are expecting.

When you are querying in step 5, try from an incognito window or add a step to logout from the admin UI first.

I was able to do this from your repro to be sure.

If your app will have authenticated users and admin users for the panel either by role or using a separate auth collection, remember to add those conditions to your read access function as …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Stupidism
Comment options

@DanRibbens
Comment options

Answer selected by Stupidism
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants