14 Aug 2012
03 Dec 2008
Link to this post
I have a web application that uses a MS SQL database (which has been updated with the ASP.NET Membership provider tables and functionality).
I have added the MyAppProvider in sitefinity, so that I can create users and assign them to roles, for that application, from within sitefinity, in MyApp database.
What I want to do, is to have some 'secure' pages that only the MyAppProvider users will have access to. These pages will be accessible by either all or some specific 'MyAppProvider' roles. For example, some pages will only be accessible by Role1 while others will only be accessible by role2, etc.
When creating a page, I set page's security to deny anonymous access and then I set Role1 to allow viewing and Role2 to deny viewing (in MyAppProvider)
Somehow, when I login in as Role1 user, this does not work as either the user has no access, or all users have access to the page.
Mind you that I have created a pagebase class that inherits from 'InternalPage' and set it accordingly to cmsentrypoint.aspx.
How can I make this work? Is there a way that I can create a new permissions property (i.e. accessible) for CMS Pages that I can set through sitefinity for the custom roles and then test it against the current logged in user (in my custom pagebase)?