Last post Apr 09, 2014 07:53 AM by Michelle Ge - MSFT
Apr 04, 2014 04:38 AM|Saravanan T|LINK
In my project we should allow the page depend upon the roles. We are having 4 different roles 1.Admin 2.Manager 3.Supervisor 4.Accountant .
The accountant is having access for only 4 pages . All others are more than 10 pages.
In the furture we will add a new page , Any of the four roles will be allow to access.
We are having the table it contains user and related form names.
How do i restrict the page access using custom role provider ?
Apr 04, 2014 07:40 AM|DarthSwian|LINK
Have a security check in the page that fires on load and checks to determine if the the user should have access to that page. If not, redirect them to an explanation page.
Apr 09, 2014 07:53 AM|Michelle Ge - MSFT|LINK
According to your description, if you want to redirect to different pages after login ok, we can check the roles then redirect to the page.
The same time, we can add roles check in every page, then we can know which page the use will redirect to and check if the user can access via user role.
Also we can add access for the pages in web.config:
Hope it's useful for you.