Skip to content

[Bug] Policy definition contains 2 different policy sets (p and p2) doesn't work in Casbin editor #472

@taksedo

Description

@taksedo

Want to prioritize this issue? Try:

issuehunt-to-marktext


Describe the bug
The case from the doc with to types of policies (p and p2) doesn't work on https://editor.casbin.org.

Link to the case: https://editor.casbin.org/#2YLC95Q57

To Reproduce
Establish following Model:

[request_definition]
r = sub, obj, act

[policy_definition]
p = sub, obj, act
p2 = sub, act

[policy_effect]
e = some(where (p.eft == allow))

[matchers]
m = r.sub == p.sub && r.obj == p.obj && r.act == p.act

and Policy:

p, alice, data1, read
p2, bob, write-all-objects

Requests:

alice, data1, read
bob, data1, write-all-objects

Expected behavior
all requests should return true, but 2nd request returns false

Screenshots
image

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Node-Casbin Easy Tasks

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions