Want to prioritize this issue? Try:

Describe the bug
When there is a comma in the policy, the policy fails to load.
To Reproduce
m, _ := model.NewModelFromFile("examples/rbac_model.conf")
persist.LoadPolicyLine(`p, alice, data, r.act in ("get", "post")`, m)
m.PrintPolicy() // Nothing is printed , it should output `[p alice data r.act in ("get", "post")]`
Additional context
Probably there was a problem in CSV Reader :https://github.com/casbin/casbin/blob/master/persist/adapter.go#L30
Can we provide a method like this :
func LoadPolicy(tokens []string, m model.Model) {
key := tokens[0]
sec := key[:1]
m[sec][key].Policy = append(m[sec][key].Policy, tokens[1:])
m[sec][key].PolicyMap[strings.Join(tokens[1:], model.DefaultSep)] = len(m[sec][key].Policy) - 1
}
Want to prioritize this issue? Try:
Describe the bug
When there is a comma in the policy, the policy fails to load.
To Reproduce
Additional context
Probably there was a problem in CSV Reader :https://github.com/casbin/casbin/blob/master/persist/adapter.go#L30
Can we provide a method like this :