mysql - Implement a Whitelist on Relational Databases -


i have growing web system of around 30,000 users.

there's few actions on web system disabled users. trusted clients might given privilege use them.

i have object handles permissions each user (get/set). permissions represented in each user database entry integer field (each bit permission).

in first option add new permission field on permission manager object each whitelist want implement. when know if current user on whitelist, call object , check permission.

but if show admin whitelist (display, edit, delete, etc), have create permission manager object 30,000 times , test each permission. think wasteful.

my second option create new table whitelists , each row different whitelist, in text field write comma separated list of users ids. problem: text varchar or kind of text field has character count limit.

i think efficient way second option since it's improbable put more 100 users in whitelist.

but there's better implementation?

maybe add new method permission manager object use 1 query build lists selected permission.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -