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

I'm not sure if I'm just doing something dumb here, but why is this not working?

https://editor.casbin.org/#EYYTJ8XQN

What I'm trying to do is to support a tenant and environment in the policies. This works fine for regular user permissions and if I assign a direct permission to the user, like p,bob,,,,,allow
It passes.

So, in assuming that I'm doing something wrong with the group matcher? Is there a way to support the wildcard with role hierarchies as well?

3views
2users
1 minread

What i was trying to avoid was having to create multiple admin roles, for example.. So, like having to have "admin_dev" or "admin_tenant1_dev", "admin_prod", etc. So, I thought I could do it with the group matcher somehow, but I am not able to figure out if that can accept wildcards

I tried also with doing 3 and combining the tenant and environment like "tenant-env" and then doing a wild ard match, but it doesn't seem like groups support wildcard matching?

In other words, is the only way to support tenant/env for groups to create separate roles per tenant/env like admin_tenant1_dev, admin_tenant2_dev, admin_tenant1_prod, etc.

I had a pretty length conversation with the ai, lol. We were unable to come to a reasonable conclusion, unfortunately

*lengthy

As far as wildcard matching for the group matcher, I can't really figure out if it's at all possible

1 / 7
Jan 2025