Solved

Multi Level User Login System

Posted on 2011-03-01
3
1,409 Views
Last Modified: 2012-05-11
Hi,

I have an idea on a multi-level user login system, where users/groups could be assigned permissions to access certain pages. This will be a add-on to a existing system.

I have attached a screen-shot of my idea. The idea is that permissions can be auto assigned by clicking different check boxes and clicking a update button.

Any code snippets/ links or ideas would be greatly appreciated.

Thanks in advance.
idea.jpg
0
Comment
Question by:abdulv
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
wwwdeveloper2 earned 500 total points
ID: 35014049
This is the database i would setup

user_table
username
password

group_table
group_id
group_name

The "bridge" table that will allow a user to be in multiple groups
user_access_table
group_id (fk to group_table)
username (fk to user_table)

Example data:
user_table
jsmith password1
jdoe password2
bdalton password34

group_table
1 Finance
2 Sales team
3 Human Resources

user_access_table
3 jdoe
3 jdoe
1 jsmith
2 bdalton
1 bdalton
3 bdalton

When you are creating your example gui with the check boxes, pull the group names and ids from the group_table - Your checkbox value should equal the id.

When you do your insert just insert the username and group_id into the user_access_table


Let me know what questions you have.

0
 
LVL 3

Expert Comment

by:wwwdeveloper2
ID: 35014055
Sorry for the typo in the user_access_table example data.  jdoe should not be in group 3 two times.

user_access_table
3 jdoe
1 jdoe
1 jsmith
2 bdalton
1 bdalton
3 bdalton
0
 

Author Closing Comment

by:abdulv
ID: 35043902
Thanks
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now