Hi,

I want to set default permission for new content types that I create on my drupal site.
In particular I need that new content type I create are hidden to anonymous users (but not to autenticated one).
I believe that rules can be an option and I have installed the access control rules integration module but I can't find the trigger: "when a new content type is created" (and after the action could be: "remove view access for anonymous user").

So, I ask: Is there a solution for disable by default the "view permission" for a content type in "access control" page, for anonymous users, when a new content type is created?

PS: I create content type with web services, this is why the default permission is so important for me.

Thanks for help

Brennino

Comments

brennino’s picture

Issue summary: View changes
brennino’s picture

Ok, I make it.
I changed the line 244 in content_access.module from:
$defaults['view'] = $defaults['view_own'] = array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID);
to
$defaults['view'] = $defaults['view_own'] = array(DRUPAL_AUTHENTICATED_RID);

inside the function content_access_get_setting_defaults and in this way I changed the default behaviour of content access module.

With this solution, every time I upgrade the module, I have to remember to change this line.

Is there a way (with a custom module, with scripts, ecc...) to move this code change outside of the module for forgetting about the changes and update the "content access" everytime I want without problems?

Thanks in advance,

Brennino

gisle’s picture

Status: Active » Closed (outdated)

This issue has not received any updates in the previous 6 years. If you believe it to still be relevant, you are encouraged to reopen the issue and update it.

If you got an email about this Issue status update, it is because you at one time (possibly a very long time ago), subscribed to it. To learn how to unsubscribe yourself, please visit: https://www.drupal.org/project/webmasters/issues/3142987