mirror of https://github.com/openspug/spug
A 添加角色的文件分发权限管理
parent
33411ae46b
commit
30c3712b47
|
@ -22,7 +22,7 @@ import os
|
|||
|
||||
|
||||
class TransferView(View):
|
||||
@auth('exec.task.do')
|
||||
@auth('exec.transfer.do')
|
||||
def get(self, request):
|
||||
records = Transfer.objects.filter(user=request.user)
|
||||
return json_response([x.to_view() for x in records])
|
||||
|
|
|
@ -113,7 +113,7 @@ function TransferIndex() {
|
|||
setFiles([...files])
|
||||
}
|
||||
|
||||
return (<AuthDiv auth="exec.task.do">
|
||||
return (<AuthDiv auth="exec.transfer.do">
|
||||
<Breadcrumb>
|
||||
<Breadcrumb.Item>首页</Breadcrumb.Item>
|
||||
<Breadcrumb.Item>批量执行</Breadcrumb.Item>
|
||||
|
|
|
@ -53,6 +53,12 @@ export default [{
|
|||
{key: 'edit', label: '编辑模板'},
|
||||
{key: 'del', label: '删除模板'},
|
||||
]
|
||||
}, {
|
||||
key: 'transfer',
|
||||
label: '文件分发',
|
||||
perms: [
|
||||
{key: 'do', label: '文件分发'}
|
||||
]
|
||||
}]
|
||||
}, {
|
||||
key: 'deploy',
|
||||
|
|
|
@ -56,7 +56,7 @@ export default [
|
|||
icon: <CodeOutlined/>, title: '批量执行', auth: 'exec.task.do|exec.template.view', child: [
|
||||
{title: '执行任务', auth: 'exec.task.do', path: '/exec/task', component: ExecTask},
|
||||
{title: '模板管理', auth: 'exec.template.view', path: '/exec/template', component: ExecTemplate},
|
||||
{title: '文件分发', auth: 'exec.transfer.view', path: '/exec/transfer', component: ExecTransfer},
|
||||
{title: '文件分发', auth: 'exec.transfer.do', path: '/exec/transfer', component: ExecTransfer},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue