[support] Before I Uninstall Content Access...

Shai Gluskin shai at content2zero.com
Mon Feb 25 03:45:17 UTC 2013


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 } } ]
  }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20130224/b7eeb0de/attachment.html 


More information about the support mailing list