Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 02:43
    sagarshah1983 commented #770
  • Apr 22 19:03
    arigon commented #769
  • Apr 22 12:59
    hsluoyz commented #770
  • Apr 22 12:24
    hsluoyz commented on 17f962d
  • Apr 22 10:28
    titus-zx commented on 17f962d
  • Apr 22 08:29
    closetool opened #770
  • Apr 22 01:11
    hsluoyz commented #769
  • Apr 22 01:05
    hsluoyz edited #769
  • Apr 21 21:14
    arigon opened #769
  • Apr 21 20:20
    arigon edited #768
  • Apr 21 20:12
    arigon labeled #768
  • Apr 21 20:12
    arigon assigned #768
  • Apr 21 20:12
    arigon opened #768
  • Apr 21 16:36
    harveyappleton commented #419
  • Apr 21 16:14
    sagarshah1983 commented #419
  • Apr 21 16:08
    hsluoyz labeled #767
  • Apr 21 16:08
    hsluoyz unlabeled #767
  • Apr 21 14:08
    hsluoyz commented #419
  • Apr 21 13:52
    harveyappleton commented #419
  • Apr 21 13:50
    harveyappleton commented #419
hsluoyz
@hsluoyz
we have contributor there to help you resolve
1 reply
Aryan Narayan
@aryan828
Question : Suppose we have a simple ACL model like https://github.com/casbin/casbin/blob/master/examples/basic_model.conf
What are other possible mathcher function we can have apart from the one mentioned in the .conf file?
hsluoyz
@hsluoyz
one_of_the_simpsons
@one_of_the_simpsons:matrix.org
[m]
Hello, Might anybody be able to give me a pointer for how to write a Casbin policy that limits access for a specific column/field?
1 reply
Simo Aleksandrov
@fr3fou
image.png
why is this a limitation?

But you SHOULD make sure that the length of the array is MORE than 1, otherwise there will cause it to panic.

this

hsluoyz
@hsluoyz
@fr3fou this is a known issue for our evaluator: Knetic/govaluate#79
Simo Aleksandrov
@fr3fou
using in for things such as keyGet2(r.obj, p.obj, 'id') in r.sub.Posts for example is super useful (correct me if i'm wrong, i don't remember casbin's syntax very well, but what i'm trying to say is "make sure that the subject's posts (array of post ids that that subject has posted) contains the specific resource id)
damn
what would you recommend doing? I'm going to be using go casbin
hsluoyz
@hsluoyz
I think it's a bug, but the upstream has no active maintainer seemingly
Simo Aleksandrov
@fr3fou
have you guys considered migrating to some other library at some point
image.png
👀
last commit on govaluate
hsluoyz
@hsluoyz
yeah, that option is on the table
is there any good alternative?
Simo Aleksandrov
@fr3fou
it's very powerful
hsluoyz
@hsluoyz
great, can you first send a github issue to casbin repo?
so we can track this ticket
Simo Aleksandrov
@fr3fou
alright
Gianfranco Reppucci
@giefferre
👋 Hello again
I've just filed a bug for an unexpected behaviour of the Enforcer casbin/casbin#748
3 replies
peterson oaikhenah
@nextwebb
hi i'm a fan casbin and i'll like contribute to casbin in the GSOC program.
do we have mentors here?
hsluoyz
@hsluoyz
@nextwebb for GSoC students please go to: casbin/gsoc channel
peterson oaikhenah
@nextwebb
@hsluoyz okay thanks
Huibing Yin
@eagleshine
Hi, I was trying to run the example "actix-middleware-example", but encountered this error:
1 reply
error[E0277]: the trait bound CasbinActor<CachedEnforcer>: Actor is not satisfied
--> actix-middleware-example/src/api/user.rs:34:12
|
34 | actor: web::Data<Addr<CasbinActor<CachedEnforcer>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait Actor is not implemented for CasbinActor<CachedEnforcer>
|
any ideas on how to fix this?
hsluoyz
@hsluoyz
@hackerchai
@eagleshine can you send github issue?
Huibing Yin
@eagleshine
senorpedro
@senorpedro
Hi Folks, I'm trying to setup a hybrid RBAC/ABAC model where I have some dynamic rules in the "p-lines" in the policy that are then eval'ed dynamically. But I dont need a attribute rule for every "p-line". Is there a way to define a empty rule? ATM I'm putting "1 = 1" in there, but that does not seem like a proper solution...
hsluoyz
@hsluoyz
@senorpedro can you leave blank there? does this work?
senorpedro
@senorpedro
if i leave it blank like e.g. "p, role, , ..." the code breaks
hsluoyz
@hsluoyz
@senorpedro change to "true"
"true" or "false" is also an expression
senorpedro
@senorpedro
yeah that works, 1 as well
hsluoyz
@hsluoyz
great!
senorpedro
@senorpedro
thx
Gene Wenning
@gwenning
I have a Java based back end and would like to provide an implementation for
const authorizer = new casbinjs.Authorizer(
'auto', // mode
{endpoint: 'http://your_endpoint/api/casbin'}
);
Without me having to spin up node, can somebody tell me what the request and response looks like? I am thinking request is: http://your_endpoint/api/casbin?casbin_subject=alice. Is this correct?
What would the JSON response look like coming back?
Feel free to send me an email at: gwenning@liveprecision.com. Thanks!
fugkco
@fugkco:matrix.org
[m]
Hello all, does anyone know of an easy way of querying a database for an object that a user might have access to?
hsluoyz
@hsluoyz
@gwenning sorry for late response, plz send github issue