Removing "Create Content" link for anon users in 4.7

brianV - May 19, 2006 - 14:39

Hello.

I am currently developing a company site using Drupal, and it is turning out quite well so far, except that I cannot get the "create content" link to go away for anonymous users. I have fiddled around with it for a while, and attempted a couple os solutions found by searching the forum, but so far no luck.

Has anyone here accomplished this? I would appreciate any help, as this is something that I think really needs to be resolved before I can use Drupal in and sort of commericial website.

Thank you for any help!

maybe just a right issue

kjp - May 19, 2006 - 14:45

just to be sure... have you make sure you disabled the right to create pages and other nodes in the access settings ?

yes - create pages is

brianV - May 19, 2006 - 14:46

yes - create pages is disabled. While the link is there, if an anon user clicks on it, he/she get's a "You are not authorized to create content" message.

Removing "Create Content"

jraper@groups.d... - May 19, 2006 - 14:49

This may seem obvious, but I thought I would try:

In Administer >> access control - for the Anon User disable everything but "node module" >> "create content". Save your changes. Log out.

Is the "create content" link still there?

The only item enabled for

brianV - May 19, 2006 - 14:52

The only item enabled for anon users in the whole list is "access content". They have no permissions in the page module, which containes "create pages" and "edit own pages".

AFAIK, this is not something that can be fixed through the front end. I got vague allusions to code hacking from other posts I have seen on the subject, but have been unable to find a definative answer. Ideally, I would like it to come and go at the same time as the administer menu. I don't need auth users to create pages, only the admin.

Sorry ...

jraper@groups.d... - May 19, 2006 - 14:56

Doing the above results in exactly the behaviour you desire for me. Sorry I couldn't help.

are you using 4.7 or an

brianV - May 19, 2006 - 15:00

are you using 4.7 or an earlier version?

I am curious, because the menu items you are describing aren't quite the same as mine...

Thanks for the trying anyways.

Yes - 4.7

jraper@groups.d... - May 19, 2006 - 15:07

In my post - I said "node module" >> "create content". Sorry, I meant "access content". Does that jive with yours?

yep...

brianV - May 19, 2006 - 15:11

yep...

hum....

kjp - May 19, 2006 - 15:00

I dont see why you would need code hacking for this unless you made other changes somewhere in the behavior of Drupal.
Maybe you just turned the rights on then off so you should reset your browser's cache...

if not, then we would need some more details really.

Figured it

brianV - May 19, 2006 - 15:14

Try disabling the content menu

Jeroen Coumans - May 19, 2006 - 15:17

If you go to admin/menu and set "content" (/node) to disabled, anon users won't see it anymore. Logged-in users will still have access to the create content menu though. Strange but true.

Restrict Access Using the Blocks

farooqsadiq - May 30, 2006 - 21:38

You can

  • goto /admin/block, configure the Navigation block
  • select 'Show if the following PHP code returns' 'TRUE'
  • Add code in Pages textarea

    <?php

            
    global $user;
             return !empty(
    $user->uid);
          
    ?>

See http://drupal.org/node/56641#comment-107384

 
 

Drupal is a registered trademark of Dries Buytaert.