views:

46

answers:

1

hi,

how can I set role permissions (content access) for specific content types, rather than CCK fields ?

I actually want the login page to appear of the user access to pages of a specific content type, or a specific view

thanks

+1  A: 

I think this will solve your problem http://drupal.org/project/content_access http://drupal.org/project/node_privacy_byrole Then in the site configuration change the access denied page to "user/login". This should do the job.

charan
Perfect, thanks. I still have a small question: do you know how can I output a line of text in the empty page ? I can easily do this with a View, but not for the single nodes, or taxonomy lists of nodes.
Patrick
You mean, how can you customize the 403 error page? You might try something like the custom404 module.
Grayside
nono.. For example, if an user visit a view with only nodes he is not authorized to see, the view is empty. (not error message). In this case I can specify the "empty view" message from the view settings(and so I've done). However, if the user visit a taxonomy term page, the page is empty (no error page, just blank page) but I don't have any option to set an "empty page" custom message.
Patrick
In views you can write in php code into the header. The code in the header is executed before the view is rendered I guess. You can use the header for validating if the user is logged in or belongs to a specific role and then direct him to where ever you want. Here I am referring to the view header and not the common page header.
charan

related questions