Comments (3)
from think-authz.
tauthz.php
'abac' => [
'model' => [
// 可选值: "file", "text"
'config_type' => 'file',
'config_file_path' => config_path().'tauthz-abac-model.conf',
'config_text' => '',
],
// 适配器 .
'adapter' => tauthz\adapter\DatabaseAdapter::class,
/*
* 数据库设置.a
*/
'database' => [
// 数据库连接名称,不填为默认配置.
'connection' => '',
// 策略表名(不含表前缀)
'rules_name' => 'rules',
// 策略表完整名称.
'rules_table' => null,
],
]
tauthz-abac-model.conf(从官网下载的)
[request_definition]
r = sub, obj, act
[policy_definition]
p = sub, obj, act
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = r.sub == r.obj.Owner`
from think-authz.
@khongshao Reference: https://casbin.org/docs/en/abac
from think-authz.
Related Issues (20)
- Argument 1 passed to Casbin\\Rbac\\DefaultRoleManager\\RoleManager::hasLink() must be of the type string, HOT 1
- RBAC 继承无效问题 HOT 10
- 【域内RBAC】 多租户 domain1 修改不通过 HOT 6
- 抛出异常应当不全错误信息 HOT 5
- 可否增加 cache 过期配置 HOT 1
- API接口 ---Enforcer::addPermissionForUser('writer', 'articles','edit'); 文档参数有与代码中facde参数不符 HOT 5
- @method mixed getPermissionsForUser(string $username) static 获取用户的权限返回空 HOT 3
- 有实际的应用项目吗? HOT 4
- 怎么添加自定义函数? HOT 5
- grouping policy elements do not meet role definition HOT 4
- UpdatableAdapter::updateFilteredPolicies has not implemented HOT 2
- 这个缓存怎么在调试阶段关闭 HOT 3
- 为什么获取域内的角色都是空数组? HOT 1
- 1.5.2=>1.5.3升级后的小问题 HOT 2
- Enforcer::enforce报 “array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements” HOT 2
- 感觉如果能加入restful路由权限会更好 HOT 2
- 没支持thinkphp版本8.0,要更新下composer.json HOT 3
- 运行报错 HOT 3
- Class 'tauthz\exception\Unauthorized' not found HOT 1
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 think-authz.