Creating Dynamic Menus with Rights

Posted by Raj.Trivedi under ASP.NET on 10/4/2012 | Points: 10 | Views : 1068 | Status : [Member] [MVP] | Replies : 0
Hello Team,

I am trying to create dynamic menus from database and then when user logs in i want that user should be able to access on those menus that he has given rights to,i have made to two table one for user and for user rights but i want to know how can i map the user to rights and then implement it in front end,and also how can i assign rights from front end i am using a checkbox to bind rights i am able to bind rights to checkbox but the only problem is to map the rights and get rights when user logs in.

I am pasting table that i have created for user and rights

***************User Table***************************

CREATE TABLE [dbo].[tbl_User](
[User_ID] [uniqueidentifier] NOT NULL,
[Name] [varchar](100) NULL,
[User_Name] [varchar](100) NOT NULL,
[Password] [varchar](100) NOT NULL,
[Email_ID] [varchar](100) NULL,
[Contact_Number] [varchar](15) NULL,
[Location] [varchar](100) NULL,
[Status] [tinyint] NULL,
[RowDeleted] [tinyint] NULL,
[Created_by] [uniqueidentifier] NULL,
[Creation_date] [datetime] NULL,
[Modified_by] [uniqueidentifier] NULL,
[Modification_date] [datetime] NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[tbl_User] ADD CONSTRAINT [DF_tbl_User_User_ID] DEFAULT (newid()) FOR [User_ID]
GO


************Rights Table**************************

CREATE TABLE [dbo].[tbl_User_Rights](
[UserId] [uniqueidentifier] NOT NULL,
[RightId] [uniqueidentifier] NOT NULL,
[Created_by] [uniqueidentifier] NULL,
[Creation_date] [datetime] NULL
) ON [PRIMARY]



Regards
Raj.Trivedi

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved



Responses

(No response found.)

Login to post response