good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Bitmask or Named permissionsby IOrdy (Friar) |
on Oct 07, 2003 at 03:25 UTC ( [id://297166]=note: print w/replies, xml ) | Need Help?? |
I could be wrong but couldn't you store a seperate permission int for each componenent giving 64 possible permissions per component. That way you still only store an int but a user may have X amount of permission int's depending on the number of components. You could extend the basic permissions class when you create a component to provide methods(aliases) for your permissions that return a boolean value for each permission. I'm thinking along the lines of Class::DBI for your construction of objects, that way your classes/code need only grab the permissions for the components they are interested in. some psuedo perl.
In Section
Seekers of Perl Wisdom
|
|