4 ms·
I have isAdmin boolean flag on my users table but I feel like I should create an adminUsers table for admin users
by jalino23 4y ago
I have isAdmin boolean flag on my users table but I feel like I should create an adminUsers table for admin users
- dpkirchner 4y agoIMO you'd be best off creating a basic RBAC system with users assigned to roles and roles granting permissions. It's not really all that complicated, especially if you do it from the start.
- jrumbut 4y agoSeconding this, having this flexibility allows your organization to be flexible in the real world.
- jakelazaroff 4y agoThe only time I’ve ever seen a system like that come in handy is when there have been a bunch of complicated permissions that don’t fit neatly into discrete levels and are assigned by users. For everything else, a boolean in the database or an ad hoc system has been perfectly fine. Don’t build things before you need them!
- erik_seaberg 4y agoThe weirdest I’ve seen was using the ecommerce tables. Admin privilege was a thing you bought, like a sheriff’s badge.
- bullen 4y agoIn my CMS: http://github.com/tinspin/sprout http://github.com/tinspin/sprout I use node based structure on top of a relational db: MySQL, Postgres or Oracle. So to define a admin you just add a GROUP_NAME node called "ADMIN" to a user, pretty simple but not very fun when you need to find all admins. It's the first and last admin interface I will ever do, since then I just hot deploy my hardcoded changes or edit the raw data instead.