This project is read-only.

authentication does not work like i want it. any help?

Topics: Administration, Customizing Orchard
Apr 27, 2013 at 11:12 AM
I made a family site for authenticated users only. The Home page only has a title and i've made two widgets, one for non-authenticated and one for authenticated users to show the text.
The Non-Authenticated widget has a layer with: not authenticated and url "~/"
The Authenticated widget has a layer with: authenticated and url "~/"

The other pages on the site are made with the default layer which i modified to only: authenticated

Login in goes fine, but if i leave the site on a page which is not the Home page, the logout proces works, but the last page is still shown. Since the menu has disapeared, new visiters can see this page, but cannot work on the site.

It is also possible for a non-authenticated user to go to every page by giving the name of the page directly, like: localhost:46422/nieuws

I had thought that since each page is made with the layer authenticated that this was not possible.

I like to fix these problems:
  • make it impossible to go any page if your are non-authenticated, except for the non-authenticated Home page
  • Login-out a user should make the site to go back to the home page automatically
Any clues how to fix this?
Apr 27, 2013 at 11:30 PM
A layer only controls the widgets it contains, not the rest of the page.

To prevent access to pages, it's not layers that you should use, it's permissions for the anonymous role.