Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a Project in which Admins have to set privilage to some users, some privilages are listed below:

1.Actions like View/Edit/Add/Delete a Table Content
2.See Some Specific Menus

Also we need to check whether the user logged in is an Admin to give such privilages

So, PLease tell the DB structure to make this possible

Thanks in advance
Posted
Comments
Zafar Sultan 10-Oct-13 2:01am    
This is such a complex functionality that I think you should not dwell into without the help of a responsible person present around you all the time. I am afraid this is not a correct place to ask such question. Nobody will design a DB structure for you. Neither is someone going to tell you what will be the DB structure as it is your project and you better know the relationships and all the necessary stuff. But yes, if you have done something and are stuck at some place we are happy to help you.
id-athul 10-Oct-13 3:03am    
Okay, Got it
Thanks7872 10-Oct-13 2:09am    
User reply button while making comment.
id-athul 10-Oct-13 3:03am    
Thanks :)

1 solution

If you have only four permissions Add/Edit/Delete/View then you can create table structure as mentioned below :

C#
User Table : 

Columns : 
	UserId (PK),
	UserName,
	FirstName,
	LastName,
	Password,
	IsAdmin (bool)


Modules Table : 

Columns :
	ModuleId (PK),
	Name,
	Description,
	

Priviledges Table :

Columns :
	PriviledgeId (PK),
	UserId (FK),
	ModuleId (FK),
	IsAdd (bool),
	IsView (bool),
	IsEdit (bool),
	IsDelete (bool)


Note : Above structure is only for the basic functionality. It can be enhanced more as per the requirement
 
Share this answer
 
v2
Comments
id-athul 15-Oct-13 6:35am    
Thanks :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900