Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

I would like to know how to give rights to users in my application
lets say users admin,Gold customer,silver customer like that

if admin logged in all my pages visible..Golden user logged in there is limit to access the page...silver user access again limits to access suppose they tried to access message should be "You don't have permit to access"

Can any one help me with this

How to handle asp.net part and SQL

Thank you
Posted
Updated 7-Apr-12 18:22pm
v3

 
Share this answer
 
Here Its
tbl_CredentialMaster
id Credential
1 View
2 Add
3 Edit
4 Delete
5 All

tbl_roleMaster

id RoleId RoleDesc
1 1 Admin
2 2 Golden user
3 3 Silver user
4 4 Customer User

tbl_ModuleMaster
id ModuleId ModuleName
1 1 ItemMaster
2 2 Gld_CustomerMaster
3 3 Slver_CustomerMaster

tbl_RolesAndCredentials

id RoleID ModulId AccessId
1     1     1     5
2     1     2     5
3     2     1     5
4     2     2     5
5     3     1     5
6     3     3     5
7     4     1     1

Now Your Roles&Credential database Design is ready
you have to create UI and Assign accordingly

Now When user Loged In pass the roleId and moduleId
and get the Assinged Credentials and Sore in session
On that Base You Can restrict User.


Thanks.
 
Share this answer
 
Comments
kimberly wind 8-Apr-12 8:57am    
hey kishore its excellent idea :) :) :) :)thanks for the help
[no name] 8-Apr-12 11:10am    
Completely unnecessary. ASP.NET already has a database for membership and roles. You should learn the tools available rather then recreating the wheel.
kishore sharma 9-Apr-12 1:11am    
Hello Mr.Mark
What you are telling is absolutely correct but for that we are restricted to use built controls and it create unnecessary logs and if we create our own it will be in our control.( I have just analysed but didn't experienced)
what you say suggestions are invited.
Thanks.
[no name] 9-Apr-12 7:11am    
You are incorrect. You are not restricted to using the built-in controls in anyway. As I said, you need to spend time learning the tools that are already available.
kishore sharma 9-Apr-12 23:45pm    
Thanks For suggestion i will go for that

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