I don't understand-- The "Create Content" and "Compose Tips" menu items refuse to go away for anonymous users, even though any "create new content" permissions in node access is disabled for all but a special role, and the same is true for the "Restrict access permissions" section when I edit the menu item itself. Surely I must be missing something obvious here??

Comments

FredJones’s picture

Check if they have permission to admin pages. Just a guess.

reubenavery’s picture

under the "node module" section in Access Control, the only rights granted to the Anonymous role is "access content".

nice idea, though... *sigh*

kjl’s picture

go to admin/build/menu

and disable the compose tips menu item

OR

in your theme's template.php, put

function phptemplate_menu_item($mid, $children = '', $leaf = TRUE) {
  global $user;

  if(($mid=='the_compose_tips_mid' && $user->uid==0){
    return;
  }else {
    return '<li class="'. ($leaf ? 'leaf' : ($children ? 'expanded' : 'collapsed')) .'">'. menu_item_link($mid) . $children ."</li>\n";
 }
}

replace "the_compose_tips_mid" with the actual ID number of the compose tips menu item.

Crazynutt’s picture

Hey all, I have the same issue.

When anonymous users have access to the content on the site, they also gain access to the 'Create content' link.
However, when this is pressed, it goes to the create content page with a notice saying not content types available for creation, or something to that effect.

What Reubidium and I would like to do is have this option only available to people who have the permissions to create content.
Hiding the menu does not work because then the people who need to access it cannot, and modifying the theme does not work either as a new 'content contributer' turning up would mean that the theme would have to be re-modified each time.

Is there a simple solution to this? I have found some people with multiple mods and patches to add, and this all seems a little over the top to just remove a menu item from no registered users.

Any help would be greatly appreciated.

Crazynutt *Waves*

kjl’s picture

Are you sure you're having the same problem?

From Reubidium's description it appears that it's not a Drupal issue so much as an issue with the contributed module "menu per role" (http://drupal.org/project/menu_per_role), which requires a core hack in order to work correctly...

It always helps if you are using a particular contrib module to mention that you are doing so.

reubenavery’s picture

Indeed, menu-per-role was not installed completely.

Patching core code sure isn't ideal... now I have one more thing to remember when doing an upgrade of Drupal core.

Thanks for that tip, kjl

thorie79’s picture

Go here: http://drupal.org/node/47212

The quick solution is to go to the menu admin and choose "refresh" on create content.

Crazynutt’s picture

Hey,
I'm not sure if we had the same issue or not, but I had done no mods that affected it.

I did find that clicking 'reset' on that menu item fixed it though.

I'm still confused as to how it did what it did...but I'm quite thankful that it is now fixed and working as I like it!

Thanks Thorie!

Crazynutt *Waves*