Custom Permissions ?

Oct 25, 2010 at 3:56 PM

What if I want to make a site private ? Where all content but Homepage will require to be authenticated ?

Actually I want to create a website where users will be automatically created via SSO, so I want to ensure that all users are authenticated before they access any content.

Coordinator
Oct 25, 2010 at 4:36 PM

You can alter the permissions returned to AuthorizationService by implementing IAuthorizationServiceEventHandler. You will find an example in Orchard.Core.Contents.Security.AutoriwationEventHandler. The goal of this specific class is to change permissions like "Publish Page" to "Publish Other's Page" if the current content is not owned by the current user.

Sebastien

Coordinator
Oct 25, 2010 at 6:03 PM

Even easier, just lock it down in web.config?