Why don't you just disable the view published content permission for anonymous users?
Jamie Holly http://www.intoxination.net http://www.hollyit.net
On 2/24/2013 10:45 PM, Shai Gluskin wrote:
I've got a site that is totally private. Once you are a member and can login, you can see everything. There /are/ different roles, but they all relate to various administration privileges which can be handled with standard Drupal permissions/roles.
Content Access adds the viewing control, which I don't need on the private side, where everyone can see everything.
I had been using Content Access which seemed like overkill since there was no content that I wanted available on the public site other than a login screen.
I came up with the following rule in the Rules module:
Trigger: View content Condition: User is anonymous Action: page redirect (preserve destination) to /user.
So simple. Am I missing something? Can I uninstall Content Access?
Shai Gluskin
Here is the export of the rule:
{ "rules_anonymous_user_redirect" : { "LABEL" : "Anonymous User Redirect", "PLUGIN" : "reaction rule", "REQUIRES" : [ "rules" ], "ON" : [ "node_view" ], "IF" : [ { "user_has_role" : { "account" : [ "site:current-user" ], "roles" : { "value" : { "1" : "1" } } } } ], "DO" : [ { "redirect" : { "url" : "user", "destination" : 1 } } ] } }