Hi,

I would like to grant access to a page only to anonymous users, but it doesn't work because when I just check this case, the authenticated users are still able to view it.

How could I do that ? (Looks simple but I can't find it)

The aim is to create a homepage for anonymous users, and another one for the authenticated ones... so both pages are promoted to frontpage, but when the user is authentified, he still sees the homepage for anonymous users below...which is the problem

Many thanks for your help !

Comments

salvis’s picture

Install the Devel Node Access module (part of the Devel module) and enable its debug mode to see what is happening.

m_i_c_h_a_e_l’s picture

I'm a little confused about this one.

When you say "anonymous user", do you mean a visitor who is not logged in?

And by "home page", do you mean the page a visitor sees when he first arrives at your site?

If that's what you mean, then isn't everyone who visits your site "anonymous" until he logs in?

I think what you need is to create certain nodes (stories and blocks, etc), and promote them to the front page, but restrict visibility to only unauthenticated users.

Then create a different set of nodes, promote them to front page, and restrict visibility to only authenticated users.

Two nodes can share the same regions on the front page, but only one will be visible, depending on whether the user is logged in or not.

But all visitors will be able to see the "anonymous user" elements when they first arrive at the site. The anonymous elements will only disappear when the user logs in.

Don't try to control access to the page. Control access to the elements on the page.

Maybe I misunderstood you.

fourmi4x’s picture

Many thanks for all your help !!

I started from scratch again as you suggested, and it's working fine now.

Thanks again !

salvis’s picture

Status: Active » Fixed

Great, thanks for letting us know.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.