1

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

aneuryzm
  • 63,052
  • 100
  • 273
  • 488

1 Answers1

1

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
  • 186
  • 1
  • 2
  • 11
  • 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. – aneuryzm Jul 04 '10 at 19:18
  • You mean, how can you customize the 403 error page? You might try something like the custom404 module. – Grayside Jul 05 '10 at 08:39
  • 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. – aneuryzm Jul 05 '10 at 09:32
  • 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 Jul 06 '10 at 10:36