Vic
Vic

Reputation: 497

how to authorize user into multiple page and vice versa

I creating a website using asp. I want the security will be like this, person1 can access page1, page2, and page3 while person2 can access the page2 and page3 then person3 can access the page4 and page3. Is this possible? and how?

enter image description here

Upvotes: 0

Views: 21

Answers (1)

Suramya Srivastava
Suramya Srivastava

Reputation: 36

You can achive it in two ways :

1st Way: Creating page level access:- most common for small website

Steps to follow:

  1. Create page object in database with read write and update accessibility Table view -> id int primary key| page name | read (boolean)| write (boolean) | update (boolean )

Once created create page for creating role for segments of pages

  1. create page for adding user to role

  2. on your master page after login, check user accessibility and make navigation bar visible of false and make a global class with page accessibility (you can use property for setting that up )

  3. on page load of each page check accessibility and do what you want


2nd way: Creating role based access

When we create large application it have segments of work related to each other of different pages We create segments (steps to follows as one unit ) Save that segment in database with linking of module

  1. create role by selecting multiple segments
  2. attached it with users and follow same steps as in 1st step

Upvotes: 1

Related Questions