-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Donny
committed
Dec 27, 2017
1 parent
d414304
commit 99a5ce3
Showing
6 changed files
with
343 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"id":"console.role.assignuser", | ||
"name":"角色分配用户", | ||
"description":"指定角色,分配给指定的用户", | ||
"namespace":"Kuga\\Api\\Console", | ||
"method":"Acc.assignRoleToUsers", | ||
"accessLevel": 1, | ||
"request":[ | ||
{ | ||
"param":"rid", | ||
"required":true, | ||
"default":"", | ||
"type":"Integer", | ||
"description":"角色ID" | ||
}, | ||
{ | ||
"param":"uid", | ||
"required":false, | ||
"default":"", | ||
"type":"String", | ||
"description":"多个用户ID以逗号分隔" | ||
} | ||
], | ||
"response":{ | ||
"data":{ | ||
"type":"Boolean", | ||
"sample":true, | ||
"description":"成功返回true,失败返回false" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"id":"console.role.create", | ||
"name":"创建角色", | ||
"description":"创建角色", | ||
"namespace":"Kuga\\Api\\Console", | ||
"method":"Acc.createRole", | ||
"accessLevel": 1, | ||
"request":[ | ||
{ | ||
"param":"name", | ||
"required":true, | ||
"default":"", | ||
"type":"String", | ||
"description":"角色名称" | ||
}, | ||
{ | ||
"param":"roleType", | ||
"required":false, | ||
"default":0, | ||
"type":"Integer", | ||
"description":"角色类型" | ||
}, | ||
{ | ||
"param":"assignPolicy", | ||
"required":false, | ||
"default":0, | ||
"type":"Integer", | ||
"description":"分配策略,0不自动分配,1自动分配给已登陆用户,2自动分配给未登陆用户" | ||
}, | ||
{ | ||
"param":"defaultAllow", | ||
"required":false, | ||
"default":0, | ||
"description":"是否允许", | ||
"type":"Integer" | ||
}, | ||
{ | ||
"param":"priority", | ||
"required":false, | ||
"default":0, | ||
"type":"Integer", | ||
"description":"优先级,数字" | ||
} | ||
], | ||
"response":{ | ||
"data":{ | ||
"type":"Boolean", | ||
"sample":true, | ||
"description":"成功返回true,失败返回false" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{ | ||
"id":"console.role.list", | ||
"name":"角色列表", | ||
"description":"获取角色列表", | ||
"namespace":"Kuga\\Api\\Console", | ||
"method":"Acc.listRole", | ||
"accessLevel": 2, | ||
"request":[ | ||
{ | ||
"param":"page", | ||
"required":false, | ||
"default":1, | ||
"name":"页码", | ||
"type":"Integer", | ||
"description":"页码" | ||
}, | ||
{ | ||
"param":"limit", | ||
"required":false, | ||
"default":10, | ||
"type":"Integer", | ||
"description":"每页显示条数", | ||
"name":"每页显示条数" | ||
} | ||
], | ||
"response":{ | ||
"data":{ | ||
"type":"Object", | ||
"hasSampleFile":false, | ||
"responseItem": { | ||
"list":{ | ||
"type":"Array", | ||
"responseItem":{ | ||
|
||
"id":{ | ||
"type":"Integer", | ||
"sample":1, | ||
"description":"角色ID" | ||
}, | ||
"name":{ | ||
"type":"String", | ||
"sample":"管理员", | ||
"description":"角色名称" | ||
}, | ||
"roleType":{ | ||
"type":"Integer", | ||
"sample":1, | ||
"description":"角色类型,1为超级管理员,0为普通角色" | ||
}, | ||
"assignPolicy":{ | ||
"type":"Integer", | ||
"sample":0, | ||
"description":"分配策略,0不自动分配,1自动分配给已登陆用户,2自动分配给未登陆用户" | ||
}, | ||
"defaultAllow":{ | ||
"type":"Integer", | ||
"sample":0, | ||
"description":"默认权限,0禁止,1允许" | ||
}, | ||
"priority":{ | ||
"type":"Integer", | ||
"sample":1, | ||
"description":"优先级,越小越优先" | ||
}, | ||
"cntUser":{ | ||
"type":"Integer", | ||
"sample":100, | ||
"description":"用户数量" | ||
} | ||
}, | ||
"description":"数据列表" | ||
}, | ||
"total":{ | ||
"type":"Integer", | ||
"description":"记录总数", | ||
"sample":10 | ||
}, | ||
"page":{ | ||
"type":"Integer", | ||
"description":"当前页码", | ||
"sample":1 | ||
}, | ||
"limit":{ | ||
"type":"Integer", | ||
"description":"每页条数", | ||
"sample":10 | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"id":"console.role.listuser", | ||
"name":"角色下的用户列表", | ||
"description":"获取指定角色的用户列表", | ||
"namespace":"Kuga\\Api\\Console", | ||
"method":"Acc.listRoleUser", | ||
"accessLevel": 1, | ||
"request":[ | ||
{ | ||
"param":"rid", | ||
"required":true, | ||
"default":"", | ||
"type":"Integer", | ||
"description":"指定的角色ID" | ||
} | ||
], | ||
"response":{ | ||
"data":{ | ||
"type":"Object", | ||
|
||
"responseItem": { | ||
"role":{ | ||
"type":"Object", | ||
"description":"角色信息", | ||
"responseItem":{ | ||
"id":{ | ||
"type":"Integer", | ||
"sample":1, | ||
"description":"角色ID" | ||
}, | ||
"name":{ | ||
"type":"String", | ||
"sample":"管理员", | ||
"description":"角色名称" | ||
} | ||
} | ||
}, | ||
"assigned":{ | ||
"type":"Array", | ||
"description":"已分配的用户列表", | ||
"responseItem":{ | ||
|
||
"id":{ | ||
"type":"Integer", | ||
"sample":1, | ||
"description":"记录ID" | ||
}, | ||
"username":{ | ||
"type":"String", | ||
"sample":"小明", | ||
"description":"用户名称" | ||
}, | ||
"uid":{ | ||
"type":"Integer", | ||
"sample":1, | ||
"description":"用户ID" | ||
} | ||
} | ||
}, | ||
"unassigned":{ | ||
"type":"Array", | ||
"description":"未分配的用户列表", | ||
"responseItem":{ | ||
"username":{ | ||
"type":"String", | ||
"sample":"小陈", | ||
"description":"用户名称" | ||
}, | ||
"uid":{ | ||
"type":"Integer", | ||
"sample":2, | ||
"description":"用户ID" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"id":"console.role.unassignuser", | ||
"name":"取消角色分配用户", | ||
"description":"指定角色,取消分配指定的用户", | ||
"namespace":"Kuga\\Api\\Console", | ||
"method":"Acc.unassignRoleToUsers", | ||
"accessLevel": 1, | ||
"request":[ | ||
{ | ||
"param":"rid", | ||
"required":true, | ||
"default":"", | ||
"type":"Integer", | ||
"description":"角色ID" | ||
}, | ||
{ | ||
"param":"uid", | ||
"required":false, | ||
"default":"", | ||
"type":"String", | ||
"description":"多个用户ID以逗号分隔" | ||
} | ||
], | ||
"response":{ | ||
"data":{ | ||
"type":"Boolean", | ||
"sample":true, | ||
"description":"成功返回true,失败返回false" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"id":"console.role.update", | ||
"name":"修改角色", | ||
"description":"修改角色", | ||
"namespace":"Kuga\\Api\\Console", | ||
"method":"Acc.updateRole", | ||
"accessLevel": 1, | ||
"request":[ | ||
{ | ||
"param":"name", | ||
"required":true, | ||
"default":"", | ||
"type":"String", | ||
"description":"角色名称" | ||
}, | ||
{ | ||
"param":"roleType", | ||
"required":false, | ||
"default":0, | ||
"type":"Integer", | ||
"description":"角色类型" | ||
}, | ||
{ | ||
"param":"assignPolicy", | ||
"required":false, | ||
"default":0, | ||
"type":"Integer", | ||
"description":"分配策略,0不自动分配,1自动分配给已登陆用户,2自动分配给未登陆用户" | ||
}, | ||
{ | ||
"param":"defaultAllow", | ||
"required":false, | ||
"default":0, | ||
"description":"是否允许", | ||
"type":"Integer" | ||
}, | ||
{ | ||
"param":"priority", | ||
"required":false, | ||
"default":0, | ||
"type":"Integer", | ||
"description":"优先级,数字" | ||
}, | ||
{ | ||
"param":"id", | ||
"required":true, | ||
"default":0, | ||
"type":"Integer", | ||
"description":"ID" | ||
} | ||
], | ||
"response":{ | ||
"data":{ | ||
"type":"Boolean", | ||
"sample":true, | ||
"description":"成功返回true,失败返回false" | ||
} | ||
} | ||
} |