orchardcmsorchardcms-1.10

Which controller builds the home page?


I need to block anonymous from entering the site, but I can't find the controller that builds the Home page nor the routing that redirects there.

Going to the widget admin and unpublishing/deleting everything in the anonymous layer, only hides the items but I need to redirect to the login page, just as the Admin area functionality.

And I cant' just remove the anonymous role, because they can access some pages and content, just not the Home.


Solution

  • Orchard, by default (though you can override this, see the blog module), uses the same controller to render all content items, including the home page.

    What you need is the content permissions module, that has a part you can attach to content types (e.g. Page) that will let you specify, per item, what roles can view it. Attaching this and setting only authenticated to view your home page should redirect to the login page as desired.