Reputation: 31
everyone,
For a while, I have searched a solution to let a group of users see one page and all of its descendants and let another group of users see another page and all of its descendants. The 2 groups cannot see each other's pages.
I put CMS_PERMISSION = True and CMS_PUBLIC_FOR = 'all' in the settings.py file, and everyone can see every page. All can I do is configure some pages with the advanced settings, check the "Login required" checkbox, and some pages can only be seen by connected user.
Also, I have tried CMS_PUBLIC_FOR = 'staff' in settings, and give the 'can_view' right to some users. However, this hide all of the public pages to non-connected users. What I need is as follows:
for examples: I have 4 pages and 2 group of users.
Page1, Page2 visible to anonymous users and all of the connected users.
Page3 only visible to connected users in group1.
Page4 only visible to connected users in group2.
Can you help me to resolve this issue? Thanks in advance.
Upvotes: 3
Views: 965
Reputation: 850
Maybe I do not get the question right, but I would try
CMS_PERMISSION = True
in the setup.py
file.
Now, the issue is that users not logged in will not see pages 3 or 4. Also not in the menu etc. To make the pages 3 and 4 visible users will need a login page. It might be just a page 5 with "login required" checked but no view resitrictions.
A little more intuitive would be to have a login page, however, that uses an app hook to a customised view that redirects to page 3 or 4 depending on the logged-in user's group.
Upvotes: 1