Open one-pyy opened 5 months ago
await auth.create_role_user("admin") await auth.create_role_user("root") await auth.enforcer.add_grouping_policy("r:root", "r:admin") # 在dependencies中使用root验证auth.requires("admin")失败
在auth.has_role_for_user函数中, 能否使用self.enforcer.get_implicit_roles_for_user再自己判定呢?
(也看到casbin没有提供has_implicit_roles_for_user了, 可能这其中有效率之类的考虑。如果是我的使用方式有问题, 请告诉我, 非常感谢!)
在auth.has_role_for_user函数中, 能否使用self.enforcer.get_implicit_roles_for_user再自己判定呢?
(也看到casbin没有提供has_implicit_roles_for_user了, 可能这其中有效率之类的考虑。如果是我的使用方式有问题, 请告诉我, 非常感谢!)