Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Role Based Authorization to pages in an App

Author  Topic 

raghulvarma
Starting Member

21 Posts

Posted - 2011-10-28 : 07:41:07
Hi,

I am developing an application and I am using the forms authentication for the authentication purpose.
Now I want to authorize users whether they are authorized to view the page or not for that i do not want to configure the roles in the web.config file I would like to get the values from the DB and verify
whether the user has rights to view the page. I need to check this to all the users for all the pages available in the application.

For that how should I create a table structure? what are all the columns needed in that?
now I have two tables one UserDetails and RoleDetails. Please find the columns for those tables

UserDetails:
Userid (PK), UserName, Password, emailId, SecurityQuestion, SecurityAnswer, RoleId (FK)

RoleDetails
RoleId(PK), RoleName, description

could I make any changes to the existing table or create a table for rolerights? if so what are all the columns need to be added?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-28 : 07:45:09
why do you need to do this authentication from db? it will result in lots of db calls will can otherwise be filtered if you're doing it in forms layer itself.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

raghulvarma
Starting Member

21 Posts

Posted - 2011-10-28 : 08:25:32
quote:
Originally posted by visakh16

why do you need to do this authentication from db? it will result in lots of db calls will can otherwise be filtered if you're doing it in forms layer itself.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/





I cannot understand what do you mean by filtering in the forms layer. Do you mean by adding the roles in the config file and checking for the rights??
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-28 : 08:41:18
yep.. thats what i meant

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -