Microsoft MVP - Orchard CMS Developer

RSS Twitter Google+

Orchard Web Developer - David Hayden

I develop exceptional websites based on Orchard CMS. I create Orchard Themes, custom Orchard Modules and Widgets, and convert WordPress and HTML Templates to Orchard Themes.


Contact Me: david@sarasota.me

Tweets
Quick tip on using WorkContext.CurrentTheme and Html.ThemePath in Orchard CMS. http://t.co/9M8c4ke9 #orchardcms
JetBrains released dotPeek 1.0, their Free .NET decompiler and assembly browser. http://t.co/O65OqcLQ
Amazon Web Services now supports SQL Server and .NET Applications. http://t.co/nNZSd9Z9
After many hours of KoA and Skyrim, I need to find a new RPG for me and the kids. Thinking an older one - Dragon Age: Origins.
Orchard 1.4.1 Released! Download: http://t.co/KDphWq7U Blog Post: http://t.co/MnVvVhHh #orchardcms
Donating my remaining 103 .NET and Software Development books to local public library today. Hope they make a difference!

Orchard Authentication Module - Secure Pages

Developing Orchard Websites is fun, especially when the Orchard Website requires a custom Orchard Module to extend the functionality of Orchard that isn't provided out-of-the-box or in the Orchard Gallery. In addition to developing Orchard Websites and custom Orchard Themes, I develop a lot of Orchard Modules for clients. From time-to-time I like to mention custom Orchard Modules I develop, and this time I thought I would mention a module I created to help secure Orchard Pages from anonymous users. It's an Orchard Authorization Module that allows the Orchard Website Administrator to secure selected front-end pages from public / anonymous users.

Orchard Authorization

Orchard CMS uses roles-based authentication on your Orchard Website and the most you can do out-of-the-box to secure front-end pages in Orchard is to disable anonymous users and/or specify certain user roles. Unfortunately, you don't get to disable anonymous access on a page-by-page basis. This can be frustrating when you only have a few pages that require the Orchard User to be authenticated on the website. This is the situation with a recent client of mine and why I created a simple Orchard Authorization Module that allowed them to choose whether a page could be accessed by anonymous users.

Securing Orchard CMS Pages

This was a fun custom Orchard Module to create and securing pages in Orchard CMS front anonymous users is as simple as checking a checkbox when you add or edit a page. In this case I am securing the About Us Page for an Orchard Website for kicks.

Securing Pages in Orchard CMS from Anonymous Users

Once you have chosen to only allow Authenticated Users to access the Orchard Page, you will see that it is secured from the Orchard Administrator Summary View.

Orchard CMS Authorization Custom Orchard Module

The end result is that now when an anonymous user tries to view the About Us Page on the Orchard Website they will be redirected to log into the website in order to view it. Of course, unchecking the check box ( the default ) allows all anonymous users to view the page as normal.

Conclusion

Developing custom Orchard Modules is extremely fun. As you can see, some pretty useful features can be created by simply extending your Orchard Websites with custom modules.

TOP! © Copyright Sarasota.me
FOLLOW ME:
TWITTER