Question

I've installed Django CMS (http://www.django-cms.org/) and it's almost perfect. I've been chatting on the IRC #django-cms group and it's been confirmed to me that I can't have access restricted to the pages I make in Django CMS to only a select few on the site side.

I know of the CMS_PERMISSIONS setting, but this seems to only restrict users on the admin site. What I am trying to achieve is have pages that are made in the admin side of CMS are restricted on the site side to a select few. So on my site side, I'd have my normal pages of Home, About, Services, Contact and then they'll be a login area. Once logged in, they'll be pages that can only be available to particular people. Some of the pages to some users, other pages to other users.

If this can't be achieve in the normal Django CMS installation, how on earth would I achieve this in another way? I'm not a Django expert, but this is something I'd like to do, and I'm not sure where to start. Can anyone help with this? Has anyone else achieved this?

Was it helpful?

Solution

I don't know Django CMS, but you could do such filtering in middleware - i.e. you could check incoming URL and redirect to login page if current user doesn't have permissions to view it.

http://docs.djangoproject.com/en/1.1/topics/http/middleware/

OTHER TIPS

Use the 'View restrictions' panel in the admin page. This is documented here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top