feat(casbin): 添加策略与角色继承管理接口
This commit is contained in:
1 parent
ba8c1f1078
commit
3999c232bd
10 files changed
+249
-2
No files matched your search
@@ -0,0 +1,15 @@
|
||||
package casbin_api
|
||||
|
||||
type CasbinApi struct {
|
||||
}
|
||||
|
||||
type PolicyRequest struct {
|
||||
RoleID string `json:"role_id" binding:"required" label:"角色ID"`
|
||||
Path string `json:"path" binding:"required" label:"访问路径"`
|
||||
Method string `json:"method" binding:"required" label:"请求方法"`
|
||||
}
|
||||
|
||||
type RoleInheritanceRequest struct {
|
||||
RoleID string `json:"role_id" binding:"required" label:"角色ID"`
|
||||
InheritFrom string `json:"inherit_from" binding:"required" label:"继承自角色ID"`
|
||||
}
|
||||
Reference in new issue
Block a user