-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
Expected behaviour:
In GetFilteredPolicy, "" empty string should be treated as empty string, and "*" should be treated as wildcard.
Actual behaviour:
"" empty string acts as a wildcard in this line of GetFilteredPolicy:
if fieldValue != "" && rule[fieldIndex+i] != fieldValue {
Suggested fix:
GetStrictFilteredPolicy which treats "" empty string as empty string, and treats "*" as wildcard.
GetStrictFilteredPolicy so as to not introduce a breaking change in GetFilteredPolicy
Why does this matter:
- It's been discussed that Casbin adapters should support empty strings, therefore there should be a way to Get Filtered Policy for rules with empty string values.
- Semantic accuracy.
Reactions are currently unavailable