<div dir="ltr"><div><div><div><div><div><div><div><div>I've got a site that is totally private. Once you are a member and can login, you can see everything. There <i>are</i> different roles, but they all relate to various administration privileges which can be handled with standard Drupal permissions/roles. <br>
<br>Content Access adds the viewing control, which I don't need on the private side, where everyone can see everything.<br><br></div>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.<br>
<br></div>I came up with the following rule in the Rules module:<br><br></div>Trigger: View content<br></div>Condition: User is anonymous<br></div>Action: page redirect (preserve destination) to /user.<br><br></div>So simple. Am I missing something? Can I uninstall Content Access?<br>
<br></div>Shai Gluskin<br><br></div>Here is the export of the rule:<br><br><span style="font-family:courier new,monospace">{ "rules_anonymous_user_redirect" : {<br> "LABEL" : "Anonymous User Redirect",<br>
"PLUGIN" : "reaction rule",<br> "REQUIRES" : [ "rules" ],<br> "ON" : [ "node_view" ],<br> "IF" : [<br> { "user_has_role" : {<br>
"account" : [ "site:current-user" ],<br> "roles" : { "value" : { "1" : "1" } }<br> }<br> }<br> ],<br> "DO" : [ { "redirect" : { "url" : "user", "destination" : 1 } } ]<br>
}<br>}</span><br><div><div><div><br><br></div></div></div></div>