That's incorrect. AI is wrong
casbin checks if a user has a role by looking in the database for a g, [userUUID], [role] rule
g means grouping I think
For example you want to check if a user has the role "admin":
userUUID = 1234 (just for example)
casbin looks in database for a rule like
g, 1234, admin
So to GIVE a user a role, you just simply need to add a rule to the database via casbin like "g, 1234, admin"
There is no list of roles involved in giving a user a role
For example in Go (language) it would look like this:
enforcer.AddRoleForUser("1234", "admin")
It's probably very similar in whatever language you're using
Ask AI:
How to give user a role in Casbin in [programming language you're using]:
enforcer.AddRoleForUser("1234", "admin")