Search code examples
phpmysqlarchitectureinventory

Proper way to design an inventory system


I am a pretty good programmer but I am not great when it comes to designing system architectures. I have a pretty simple inventory system I am making however I would like to know a good way to structure it.

I have around 20 pieces of equipment that users can [View All | Update | Delete | Add] each of them. However I have different access levels for different equipment (which needs to be dynamic, change who can view or delete what).

For example, one piece of equipment would have?

addPart1.php
removePart1.php
updatePart1.php
index.php (view all parts)

addPart2.php
removePart2.php
updatePart2.php
index.php (view all parts)

For all parts? Im confused on trying to design a good, scalable and efficient structure.


Solution

  • An access control list (ACL) is a list of permissions attached to an object. An ACL specifies which users or system processes are granted access to objects, as well as what operations are allowed to be performed on given objects. In a typical ACL, each entry in the list specifies a subject and an operation (e.g. the entry (Alice, delete) on the ACL for file WXY gives Alice permission to access file WXY).

    Source: WIKI

    Please take a look at:

    http://dev.juokaz.com/php/acl-made-easy-part-1 (tutorial on ACL)

    http://sourceforge.net/projects/tackle/