Skip to content

allowing more than 9 types of policies/requests #239

@etienne-lebrun

Description

@etienne-lebrun

With the current implementations, policies above p10 and requests above r10 do not work.
This is because these regexps only keeps a single digit: 
https://github.com/casbin/pycasbin/blob/a16bfaa669c37ac1598684e36b0319430ab749e5/casbin/util/util.py#L23
https://github.com/casbin/pycasbin/blob/a16bfaa669c37ac1598684e36b0319430ab749e5/casbin/util/util.py#L30
simply replacing the question mark by a star eval_p = re.search(r"\bp(\d*)\.", s) would allow to support more than 9 policies

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreleased

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions