Re: how to do a good rights management
yes, that is the question, how to do a working structure and storage of it, both easy to read, write and modify from my code?
is it better to make boolean rights for each use, or should i make fewer with a certain level?
like:
booean type generates this kinda rights:
read page A
modify page A
alter page A
whatever page A
or the level based of
Page A: read, modify, admin etc with increasing rights...
the first one take more out of the db, with storage and looping etc,
but is really simpler to work with, I guess?
or the second way which is easier with the db, but would need more logic in the code
to interpret the rules.
and, if you go with boolean type, should I store all rights with true or false, or just the set ones? what would be easiest? what would be better in a coding example, how to check if a right is ok or not etc?
it's many questions, ofcourse some, Ieed to just decide much depending on my code, but it is still a few ways to go depending on what makes logical and usable.
|