我有以下政策:
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我需要阻止/alice_/:id/使用
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/ for是/alice_data/*的子集,但是我想阻止/alice_data/123/for的bob,所以可以这样做吗?请指导
发布于 2022-01-03 02:05:06
要控制/alice_data/123/using是否与/alice_data/*匹配,需要使用regexMatch或定义自己的keyMatch:https://casbin.org/docs/en/function
https://stackoverflow.com/questions/70377048
复制相似问题