casbin
casbin copied to clipboard
hasPolicy can not get policy bug hasNamedPolicy
use version: casbin/casbin/v2 v2.89.0 go version 1.22
describe: while I use hasPolicy func to get policies in mysql,the bool result return always is false and I try hasNamedPolicy func to get policy , it can be return right result
ex: (debug logs) hasPolicy {"aclExits":false,"err":null,"file":"logs.go","func":"cmp/logs.Debug","level":"debug","msg":"debug for test get hasPolicyfunc","time":"2024-06-25 07:43:13"} hasNamedPolicy {"aclExits":true,"err":null,"file":"logs.go","func":"cmp/logs.Debug","level":"debug","msg":"debug for test get hasNamedPolicy","time":"2024-06-25 07:45:10"}
@tangyang9464 @JalinWang
Please provide a reproduction, including your model, policy, and code
Closed as stale