API
Version 7.x > API > Custom protected aspx page View modes: 
User avatar
Member
Member
Luca - 11/7/2013 10:00:23 AM
   
Custom protected aspx page
Is it possible to set Authentication required permission on a custom aspx Page (page created in Visual studio)?

I.E. extending a class like CMSContentPage a public user can't access to the aspx Page ("Permission for UI element 'Content' is required. ") but it needs specific permission...

Is there a specific class to extend, or other "best practise" solution?

Thanks

User avatar
Certified Developer 10
Certified Developer 10
josha-bpstudios - 11/7/2013 10:13:46 AM
   
RE:Custom protected aspx page
You can add it as a module and then set the permissions that way or on the page load you can check if the current user is in a certain role through the api. If they aren't then don't process that page and show an alert or message stating they don't have permissions.

User avatar
Member
Member
Luca - 11/7/2013 10:44:49 AM
   
RE:Custom protected aspx page
Well,

I chose this solution:

Aspx Page extends CMSPage ( I need things like DocumentManager...)
and check permission by CMSContext.CurrentUser.IsAuthenticated()

:-)