Giter VIP home page Giter VIP logo

Comments (9)

tyson239 avatar tyson239 commented on June 19, 2024

好像找到了问题,获取Policy列表,所有的最后一个参数,末尾都有一个,
image

from think-authz.

leeqvip avatar leeqvip commented on June 19, 2024

还有问题吗

from think-authz.

tyson239 avatar tyson239 commented on June 19, 2024

有,现在的问题就是Policy最后一个字段的末尾会多出一个,号,使用enforce时也要加上一个,号才能判断正确,但是在数据库中是没有这个,号的。

from think-authz.

leeqvip avatar leeqvip commented on June 19, 2024

完整的rules表截个图

from think-authz.

tyson239 avatar tyson239 commented on June 19, 2024

image
规则都是一样的,只是v1、v2不同。

from think-authz.

leeqvip avatar leeqvip commented on June 19, 2024

没看到 v4=GET的呢

from think-authz.

tyson239 avatar tyson239 commented on June 19, 2024

我是出了上面那个问题后,觉得可能是通配符问题才改成GET试试的,一样会有,的问题。

        $haspermission = Enforcer::getFilteredPolicy(0, 'backend', '2', '3');
        var_dump($haspermission);
  | array(1) {
-- | --
  | [0]=>
  | array(5) {
  | [0]=>
  | string(7) "backend"
  | [1]=>
  | string(1) "2"
  | [2]=>
  | string(1) "3"
  | [3]=>
  | string(11) "/auth/login"
  | [4]=>
  | string(2) "*,"
  | }
  | }
  |  

from think-authz.

leeqvip avatar leeqvip commented on June 19, 2024

更新到最新开发版:

composer update casbin/think-authz:dev-master

from think-authz.

tyson239 avatar tyson239 commented on June 19, 2024

好的,刚发现是composer镜像没有同步,前几天更新过也没发现。
更新后测试正常了,辛苦了。

from think-authz.

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.