I have a table that contains is laid out as so:
employee id superman admin management etc etc
Where each column is a permission set. The values are either 0 or 1.
What I've been doing is in each program is the following:
if ($Superman == 1 || $Admin == 1)
//Run the program
die ("Not allowed);
What I'm wondering is how can I implement this better so I can handle all permissions and programs in the database table rather than hardcoding it in the database.
The only piece that is confusing to me is that one user may belong to three or four different groups.