Giter Site home page Giter Site logo

Comments (5)

Taoyuesong avatar Taoyuesong commented on August 25, 2024 1

@vova-lantsov-dev Hi, I have tried to address this issue with pull request #355. It includes test cases for the scenarios you mentioned and the tests are now passing successfully.
If you have time, could you please review the changes in the PR?

from casbin.net.

casbin-bot avatar casbin-bot commented on August 25, 2024

@sagilio @sociometry @AsakusaRinne

from casbin.net.

sagilio0728 avatar sagilio0728 commented on August 25, 2024

Here are two questions:

  1. The current transformer processing for Matcher does not recognize index operators, and this needs to be fixed.

    string perfix = @"(?<=(\s|^|\||&|!|=|\(|\)|<|>|,|\+|-|\*|\/|\\)\s*)";
    string suffix = @"(?=\s*(\s|$|\||&|!|=|\(|\)|<|>|,|\+|-|\*|\/|\\|\.|in))";

  2. The overload used for Enforce is incorrect. Enforce currently supports generic parameters, which helps to avoid the significant overhead caused by forced boxing. You can try to make a direct call, like this:

var authorizationAttributes = new Dictionary<string, Dictionary<string, string>>
{
    ["CompanyData"] = new Dictionary<string, string>
    {
        ["CompanyIsActive"] = "True", ["BusinessRole"] = "Role1"
    }
};
result = _enforcer.Enforce(authorizationAttributes, role, path, method);

from casbin.net.

vova-lantsov-dev avatar vova-lantsov-dev commented on August 25, 2024

Thanks, I will try to implement it

from casbin.net.

github-actions avatar github-actions commented on August 25, 2024

🎉 This issue has been resolved in version 2.7.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

from casbin.net.

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.