Joining Actions with their required access levels
Posted: Wed Jul 29, 2009 3:51 pm
Hello everyone. I have a feeling that this is a topic that perhaps has been covered before, but I am unsure how to go about finding any reference for it. What I'm attempting to develop, at the most basic, is an event handler that has the access levels built-in to the event constant. I'm not sure if that makes sense at all, so here's an example of what I'm trying to do.
Admin access level = 1
Client Admin access level = 2
Executive Access level = 4
User Access level = 8
Agent Access level = 16, and so on...
Action_Edit_User = (all | allowed | access | levels) <joined with> (the_number_representing_the_action)
If that makes sense. I figure If I can join the two together, pass as an integer, I can use a bitmask to pull out all the information I need. Is this even worth doing, or is there a much better approach to something like this?
Thanks much, sorry if this is just a bunch of babble!
-Andy
Admin access level = 1
Client Admin access level = 2
Executive Access level = 4
User Access level = 8
Agent Access level = 16, and so on...
Action_Edit_User = (all | allowed | access | levels) <joined with> (the_number_representing_the_action)
If that makes sense. I figure If I can join the two together, pass as an integer, I can use a bitmask to pull out all the information I need. Is this even worth doing, or is there a much better approach to something like this?
Thanks much, sorry if this is just a bunch of babble!
-Andy