Giter Club home page Giter Club logo

Comments (5)

casbin-bot avatar casbin-bot commented on June 10, 2024

@tangyang9464 @imp2002

from jcasbin.

hsluoyz avatar hsluoyz commented on June 10, 2024

@Harishs27 can you answer these?

  1. What you do?
  2. What you expect?
  3. What you got instead?
  4. Is this happening for all Casbin versions? If not, it starts to happen from which version?

from jcasbin.

Harishs27 avatar Harishs27 commented on June 10, 2024
  1. We are using rbac for authorization. I am using RBAC model with domain.
  2. I should be able to use casbin enforcer to fetch roles, permissions of user and should be able to validate permission of user against the stored policy using casbin.
  3. When trying to fetch the users roles and permission the enforcer.getRolesForUserInDomain(userId, domain) is throwing error as org.casbin.jcasbin|error: name does not exist. Ideally it should have given me all the roles which are associated to the user. And by querying the db i can see that the user has multiple roles with him.
  4. We have multiple environments where we are using the same version of casbin for authorization and it's all working fine. But however it started failing in one of the environments now. And it's unable to recover from this state.

I have not upgraded to new versions of casbin. So i am not sure if its recurring issue with other versions as well

from jcasbin.

imp2002 avatar imp2002 commented on June 10, 2024

Run test testRoleAPIWithDomains() in RbacAPIWithDomainsUnitTest.java to test getRolesForUserInDomain(), all as expected! The probability is that you are using it incorrectly, you can refer to the usage of the test.

image

from jcasbin.

hsluoyz avatar hsluoyz commented on June 10, 2024

Closed as resolved

from jcasbin.

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.