Giter Club home page Giter Club logo

Comments (6)

casbin-bot avatar casbin-bot commented on May 29, 2024

@tangyang9464 @JalinWang

from casbin.

MuZhou233 avatar MuZhou233 commented on May 29, 2024

@dhonor-dyj Please provide a minimum reproduction.

from casbin.

dhonor-dyj avatar dhonor-dyj commented on May 29, 2024

[request_definition]
r = sub, obj, act

[policy_definition]
p = sub, obj, act

[role_definition]
g = _, _

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

[matchers]
m = r.obj == p.obj && g(r.sub, p.sub) && r.act == p.act

This is the model definition

from casbin.

dhonor-dyj avatar dhonor-dyj commented on May 29, 2024

The problem is that after you add policies p and g, the user will be checked several times. Not always, but after a few seconds, the user will be checked. The check method is BatchEnforcce().

from casbin.

MuZhou233 avatar MuZhou233 commented on May 29, 2024

The problem is that after you add policies p and g, the user will be checked several times. Not always, but after a few seconds, the user will be checked. The check method is BatchEnforcce().

I can't reproduce this problem based on your description. Please provide model(we already have), policy, and code that can reproduce this problem.

from casbin.

dhonor-dyj avatar dhonor-dyj commented on May 29, 2024

resolved, The reason is that an error occurs when watcher is used for synchronization. Each time the database is changed, the instance is not excluded during synchronization, and the default loadPolicy() function is used to reload the policy during synchronization. During the loading process, a new check fails.

from casbin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.