Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

多租户报错grouping policy elements do not meet role definition #13

@xxi-arch

Description

@xxi-arch

`
grouping policy elements do not meet role definition
[request_definition]
r = sub, dom, obj, act

[policy_definition]
p = sub, dom, obj, act

[role_definition]
g = _, _, _

[policy_effect]
e = some(where (p.eft == allow))

[matchers]
m = g(r.sub, p.sub, r.dom) && r.dom == p.dom && r.obj == p.obj && r.act == p.act

// 设置角色权限
Casbin::addPolicy('zzyRole','1', 'data1', 'filed', 'read');
// 设置用户角色
Casbin::AddRoleForUser('zzy','zzyRole','1');

`

AddRoleForUser 方法node版是有最后一个参数的

casbin/node-casbin@e876217

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions