Hi.
I’m trying to find out the best way to create a password protected area within my ModX site on a sub-page (i.e. a child of a main menu page).
I’m not sure what the best practises are here. I tried to create a user group and assign that user group to access permissions, but the page still seems to be viewable to everyone.
Not sure how to set up the file / permissions correctly.
Ideally, I’d want the system to prompt the user for a password, before being allowed into that section.
I could set it up using PHP/Apache permissions, I think... would this be the only way? It is kind of "outside" MODx.
Anyone with experience in this area?
Thanks!
-
☆ A M B ☆
- 24,524 Posts
1. Create a web user group, a document group, and connect the two (Security -> Web Permissions).
2. Assign the relevant documents to the document group.
3. Assign web users to the web user group.
Now only logged-in visitors belonging to that group can see the documents. In the configuration (Tools -> Configuration) you can specify a document to use as an unauthorized page. This document would have a login form, so in case anyone tried to access one of the protected pages they would get the login form page instead.
Thanks.
I think what they want is a simple login, e.g. like a separate server request login, that asks for a username and password to a particular MODx page. So any user (or even the public) can click on the link, but it asks for a completely different username/password.
So kind of like password protecting a directory on cPanel (but of course, you can’t do it on cPanel because there is no actual real "folder", only a MODx URL.
MODx is set up to show friendly URLs, but I’m not sure if cPanel sees them as actual URLs to password protect. Know what I mean?
The page would have documents for downloading, for instance that can be edited through MODx, but the URL is blocked with that password when they try to view the page. Is that the sort of thing that would require a server handler to detect the URL and block its access?
I know, it is a "special" need, but an interesting one to find out how to resolve!
Thanks!
Or use Susan’s solution above and put a copy of the Personalize snippet on the page to show the login form to un-logged-in users and the page to others.
I think Susan’s solution is exactly what I need however I don’t like that the password protected pages don’t show up in the menu/navigation despite being set to do show.
Is there a workaround?
ah yes good ole Weblinks. I’m thinking I’ll use managermanager to remove the weblinks from the client’s view....so as not to confuse them?
Thank you!!
Finally gave this a try and it works great - the first time. Then it vanishes from the page. Tried both cached and uncached, installed as directed (checked 3 times).
Any pointers?
Evo 1.0.5, using FF2/Mac.