Closed wim-web closed 3 years ago
@wim-web I think Casbin-editor may have bug.
@Zxilly plz fix it.
working on this
@hsluoyz I believe this is different default behavior between node-casbin and golang-casbin. Plz move this to node-casbin.
@hsluoyz this is Golang-casbin issue. the alice
belong to admin
role, so aclice, data1, read
is true
.
@nodece He didn't use g2(r.sub, p.sub)
to build role link, so g2, alice, admin
should be ignored.
@nodece He didn't use
g2(r.sub, p.sub)
to build role link, sog2, alice, admin
should be ignored.
Agreed with @Zxilly
So this is still a Node-Casbin issue..
@hsluoyz @Zxilly g
and g2
uses same role manager, so g
== g2
and returns true
. I tried to use jcasbin and node-casbin to check this model and policy, which returns true
. If golang-casbin
is right, we should update all code.
@nodece that's right.
@Zxilly plz update Node-Casbin
@nodece We have updated rm
to rmMap
, now every group has its own role manager.
This is meant to use different match function on different role.
@hsluoyz I checkout go-casbin
to check this issue, we need to update casbin of other program language.
@Zxilly thanks for your contribution :)
@nodece plz update the editor version.
I used the same model, policy, and request, but the results were different between the website editor and local code.
on website
on local code
model.conf
policy.csv
main.go
go.mod