Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

PHP User Permissions

Posted on 2013-10-29
3
289 Views
Last Modified: 2013-10-29
I am working on a complete overhaul of our corporate intranet, and I'm looking for guidance regarding setting up user permissions.

Currently, we have about 65 applications, 350 users nationwide, and functions within each application.

Not all users have access to all applications, and if an employee does have access to an application, they may not have access to all functions within.

My line of thinking right now is this:
- Assign each application a unique Id.

- Assign each user permissions to the application ID's that they would need.

- Create a functions table that would hold function names, such as canEdit, canConvert,  canDelete, etc.

- Assign each user access to the functions they would need by either a 1 or a 0 value in the database table.

There clearly isn't a right or wrong answer to this, but I wanted to consult with an expert to get their opinion on my issue, as the articles I've read on the subject do not really clarify how many users or functions they are dealing with.

Thanks in advance!
0
Comment
Question by:t3chguy
  • 2
3 Comments
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 39608688
I think you're on fairly firm ground with that kind of a design

You would have a one-to-many relationship between persons and applications, and a one-to-many relationship between person+application and permissions.  This would allow you to add or remove persons easily, join applications to persons, and allocate permissions to each person independently of the various applications they would use.  Initial setup may be a bit of work, but table maintenance will be a breeze for the administrator.
0
 
LVL 1

Author Closing Comment

by:t3chguy
ID: 39608752
Thank you sir!  Glad I got that clarification.  I'm going to be posting this same question in a MySQL section to see if a DBA can help layout these tables.

As a side note, you'll be pleased to know that my new revision of this corporate intranet will be utilizing PDO!
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 39608802
+1 for PDO!  Thanks for the points and thanks for using EE, ~Ray

And just a note for going forward... You can choose up to three Zones when you post a question, so you can get a little more intellectual cross-pollination that way.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

789 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