Casbin Forum runs on Casnode, the open-source Discourse-style forum. Try the Casnode demo →
Casbin Forum

Hello Everyone,

I'm trying to get all the permissions for user bob using getImplicitPermissionsForUser("userA") but to my surprise, it is only fetching the policy directly assigned to user - userA and not fetching implicit permission of admin role.

p, alice, contractor, data1, r.obj.creator_id == p.sub, read
p, bob, admin, data2, (r.obj.creator_id == p.sub && r.sub_role == p.sub_role), write
p, *, admin, data2, (r.obj.creator_id == p.sub && r.sub_role == p.sub_role), read

g, bob, admin
g, alice, contractor

looks to me a bug in the getImplicitPermissionsForUser("userA") method. Could someone check and let me know what could be wrong here.

Thanks,

1views
2users
1 minread
1 / 6
Jul 2024