Author: Rivelyn | Posted on: 9/15/2008 7:42:10 AM | Views : 310

I am building a website for a client and have built them a system to add their own content, kind of a scaled down WCMS. All of the content is stored in a MS SQL database.

They have requested the ability to add new rolls and then add new content only available to those roles so everything needs to be dynamic.

This rules out the use of the standard way I usually impliment security using a web.config file in each secure folder and allowing only a pre-defined role to access the folder.

So I was thinking I could just on a page load event call the current logged in users role and check that value against the created pages pre-assigned role in the database.

IE: Page1 is created, from a dropdown list of roles the author selects what role can view the page, that rolename is stored in the Page1's DB record.

When a logged in user requests that page in the page load event I pull the users rolename and just do an If Then statement, if the users role is ...

Go to the complete details ...