Hi, I am new to MODx and Revo and am currently trying to work out a structure for our website which will have both public and members only areas.
I am unable to work out how to restrict a page to a logged in member. I have been using the following steps:
1. Create a "Members Only" resource group
2. Add the members pages to the Members Only resource group.
3. Create a "Members" user group.
4. Add the Members Only resource group to the Members user group with min-role:9999; Access Policy:Load, List and View; Context:web.
5. Add the users to the Members user group with role=member.
No matter what I try the pages in the resource group are hidden from all users as soon as I add the Members Only resource Group to the Members user group.
Can anyone help please? I read every scrap of doco I can find and tried every combination I can think of. Currently using "MODx Revolution 2.0.0-rc-2 rev6923".
Thanks,
Greg.
Are your member users logged on in the front end when they try to access the pages? Did you flush permissions, cache, and sessions before testing?
OK I think I’ve found the problem - 2 things.
Firstly I was running all the tests using Firefox on the one PC and I think it was mixing up the sessions somehow. I continued to run manager on Firefox and tested the front end with IE8 on another machine and it works.
Secondly I am using Wayfinder and I needed a "!" in the tag to stop the menu being cached from before the logon and therefore not showing the secure page in the menu after logon.
Cheers,
Greg.
-
☆ A M B ☆
- 3,141 Posts
If you want your member only pages to be visible when you are logged in at the Manager also, you’ll need to give your Administrator group access to the resource group and the web context also.
Right. Different instances of the same browser doesn’t work. It has to be another browser altogether.
I’m also having problems with security.
The issues for me are
1. Editing Access Policy Permissions - not being saved. I’ve copied Administrator to AdminLite per the tutorial but when I try to delete some options from AdminLite I don’t get "Save successfull" and the items are not removed. When I created a new Access Policy from scratch (not duplicated Administrator) I could edit it.
2. Updated Policies have no effect - I’ve tried deleting a policy via phpMyadmin, like element_tree, but when I flush everything (including the toilet) and login as the new user in a different browser (chrome) the Elements are still visible. Am I missing something?
3. Adding policies manually - prompted for name and description, like "element_tree" and "The ability to view Element Tree on the left nav." I entered this and it saves exactly this to the database when view via phpMyAdmin but the database requires "perm.element_tree_desc" in the description column - this is a bit confusing.
Oddly this is working on my local WAMP server but not on the deployment Apache server?