Comments (3)
Hi @calebfaruki,
The request_definition
defines the enforce()
argument, The policy_definition
defines the policy.
The first example: The first parameter of enforce
is allowed to be any character, and the policy file has Resource, Read
, so calling enforce()
returns true
.
The second example: Policy should be p, Resource, Read
and call enforce()
will returns true
.
from node-casbin.
Hi @calebfaruki , I tested your case, the result is true (allowed): https://github.com/hsluoyz/node-casbin/commit/8a8fa92efbb36a0a2e817c413767b76596423b6a
from node-casbin.
Closed as stale.
from node-casbin.
Related Issues (20)
- [email protected]: The expression-eval npm package is no longer maintained HOT 5
- [feature] ABAC support for EnableAcceptJsonRequest() HOT 2
- enforcer.deleteUser() wiped out all data from `casbin_rule` table HOT 1
- Without enforcer.loadPolicy() Casbin behave unpredictably on mass updates. HOT 1
- [Bug] Can't resolve 'fs' HOT 7
- [bug] When using ‘watcherEx’, deletion does not trigger it; you need to configure a ‘watcher’ for it to work. HOT 2
- [Bug] The lack of a constructor results in the default configuration not taking effect. HOT 3
- addMatchingFunc HOT 2
- usage of addMatchingFunc HOT 2
- [Question] Can the cache stored in memory here be placed in Redis? HOT 3
- Why I can't use enforcer to judge the req using the rbac modle? HOT 1
- Enforcing with domains and 100k+ policies causing performance issues HOT 4
- [Bug] Policy definition contains 2 different policy sets (p and p2) doesn't work in Casbin editor HOT 4
- escapeAssertion does not respect string literals HOT 3
- Effects are ignored for all policies other than the first one HOT 2
- Fix: Discrepancy between `getAllNamedRoles` function implementation and comments HOT 6
- Replace depricated library [email protected] HOT 2
- Feature Request: Method to Retrieve All Domains for a User or a role HOT 1
- How to do Role hierarchy with domain using casbin HOT 1
- How to get user all permissions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-casbin.