SQL backed RBAC
swill opened this issue · comments
Will Stevens commented
Maybe this is possible and I am just not clear on how I would implement it. Is it possible for me to save/load my role and permission data out of a mysql database (or another type of DB)?
Xing commented
If you are using RDBMS, two tables will be needed: a) roles b) permissions. The entity-relationship could be like this:
ROLES -(m)--(n)- PERMISSIONS
All that remains is SELECT FROM
tables, New
a rbac variable and Set
/Add
roles with permissions.
If you are using NoSQL DB, rbac.Dump
and rbac.Restore
could help you.