Hi,
I have created a website with articles (collections) and different member groups. Each group got acces to different articles. This all works fine, but now I want to showcase it with getResources.
The output is only the few articles that are accessible for everyone. When I clear the cache, the full list of all articles that are created appears. Nothing changes when a member is logged in. There must be some miscommunication between the member rights and getResources. I have tried everything several times and have no idea what’s the problem. Also I don’t know why everything appears when I clear the cache.
This is the call:
[[getResources?
&showHidden=1
&parents=7
&depth=1
&sortby={"publishedon":"DESC"}
&tpl=weergaveOverzicht
&includeTVs=1
&processTVs=1
&tvPrefix=``
&limit=0
]]
getResources applies permissions, so when you as manager user clear the cache and visit the page, it will use your manager permissions to render all pages.
That’s then written to cache.
When the cache is cleared and the first user to visit that listing does not have permission to view them all, it only lists what they can access.
And then that is written to cache.
If the output of a snippet may be different from request-to-request, whether due to permissions, a request variable, or something time-based, you will need to call that snippet uncached.
Thanks Mark!
I think that I understand what you’re saying. But I want the list to match with the articles the user has access to. It now doesn’t make a difference if someone is logged in or not. At the moment, people that should have access to all articles only see the ones that everyone got access to. Something goes wrong here. Do you understand the problem?