CASBIN url 子集块

CASBIN url subset block

我有以下政策:

p, alice, /alice_data/:id/using, GET
p, bob, /alice_data/*, GET

我目前的执法者执法结果:

alice, /alice_data/hello, GET  ->  True
bob, /alice_data/123/using, GET -> True

我需要阻止 bob /alice_data/:id/using

alice, /alice_data/hello, GET  ->  i want it to be True
bob, /alice_data/123/using, GET -> i want it to be **False**

因为 /alice_data/123/using/alice_data/* 的子集,但我想阻止 bob对于 /alice_data/123/using我可以这样做吗??请指导

要控制/alice_data/123/using是否匹配/alice_data/*,您需要使用regexMatch或定义您自己的keyMatchhttps://casbin.org/docs/en/function