We help IT Professionals succeed at work.
Get Started

Logic for Access Levels

87 Views
Last Modified: 2016-02-25
Hi Experts,

Can anyone give my any ideas on how I can about creating Login Access Levels that admins can use to specify which access level can access which module for a PHP/MySQL application.

There is a pre-defined list of ~25 modules going up to 2 levels deep, for example:

Orders
Login Levels
Reports
             
Today’s Sales
             
Monthly Sales

As you can see there are modules, and sub-modules, but there won’t be sub-sub-…-modules… just the 2 levels. I tried to make the 2 reports indented to demonstrate sub-levels, but EE won't let me.

To further complicate it, each may have either yes/no as options, or Full Access / Read-Only / No Access as options.

I guess, I’m looking for ideas on how to structure my DB for this, so when admins create a new level, I can use  it as a template, then save the selections for each level.

As for the actual restriction, that I have  figured out partly…  I imagine that each module would be a database record, so I would pull all records associated to the user’s level, store it into a Session Associative array, then for each module do an If statement.

Any ideas would be greatly appreciated!
Comment
Watch Question
Principal Data Engineer
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 3 Answers and 4 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE