Not through with the thread yet
As I told you I chose to use MODX for my next project so that I could make some concrete remarks, so I’m quickly testing some required functionalities to see if everything will be OK.
First I checked the FormIt plugin again, did a quick hook to add jQuery validation dynamically (by processing the validator parameter sent to FormIt). Runs great.
Next step. Security. This has driven me mad for a couple of hours now so I guess it’s my first concrete complain "WTF with the manual", before using the issue tracker I’ll submit this to you, maybe I missed something.
Been there :
http://rtfm.modx.com/display/revolution20/Making+Member-Only+Pages
1 - Made 2 documents (home, test)
2 - Tutorial Step 1, Create a Resource Group - OK
3 - Tutorial Step 2, Link your member-only resource to the Resource Group : drag and dropped my "test" document OK. Did a quick check in its "Access permissions" tab : definitely OK.
4 - From the tutorial, again in step 2 : "It is important to realize that as soon as you have protected a resource by assigning it to one or more resource groups, those pages will no longer show up for users that are not linked to the resource group.". Riiiiiiiiiight, OK, let’s test this : flush permissions, clear cache, flush all sessions. Open another browser (Firefox before, now Chrome), clear all Chrome cache. Load the "test" document URL as an anonymous user : content is accessible. No 404 or whatever.
Did I misunderstand something? Maybe that’s because the anonymous user has access to the web context? Or not. Don’t know. Don’t get it.
Follow up : in the tutorial, the sentence next to the one I quoted is "The default behaviour in that case is displaying the 404-error page. If you would rather return the 403-error, you will need to give the anonymous user group "load" permission for the resource group.".
Maybe that’s stupid from me, but I did a quick search through all the MODX core files, and found no reference to 403. Found 404, 401, right. But no 403. So again maybe I just missed something but how can a 403 be generated there? Tutorial mistake? I’d like to check but I can’t even get the 404.