I use NewsEditor, but today I found a problem: I can pass an id via get to edit the document, but the snippet doesn’t control the permission. How can I solve this problem? What functions to check the auth?
thanks a lot!
-
MODX Staff
- 12,272 Posts
"id" is essentially a reserved parameter in the current iteration of MODx. Try using some alternate parameter name in your code like "myid".
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
aleinside, I had the same issue. If I’m correct, you’re referring to the fact that you can "guess" the MODx content ID for a news item and access it directly in your browser, bypassing NewsEditor or NewsManager. I’ve modified my NewsEditor snippet to dynamically set the document group/s of the newly created content item, to limit access to particular document groups and hence web user groups.
I would share my modification right now except it is a horribly messy hack in its current state, I need to clean it up before anything can be done with it. But if you’re interested, by all means send me a PM and we’ll take it from there.
EDIT: Sorry, I re-read your post, seems you’re referring to a different issue. I’ll leave my reply intact anyway.