Optimize permission
This commit is contained in:
@@ -51,7 +51,7 @@ const Base = () => {
|
||||
loading={loading}
|
||||
onReset={handleOnReset}
|
||||
onSave={handleOnSave}
|
||||
modifyOperationCode={'system:settings:modify:base'}
|
||||
modifyOperationCode={['system:settings:modify:base']}
|
||||
>
|
||||
<AntdForm
|
||||
form={baseForm}
|
||||
|
||||
@@ -106,7 +106,7 @@ const Mail = () => {
|
||||
loading={loading}
|
||||
onReset={handleOnReset}
|
||||
onSave={handleOnSave}
|
||||
modifyOperationCode={'system:settings:modify:mail'}
|
||||
modifyOperationCode={['system:settings:modify:mail']}
|
||||
expand={
|
||||
<AntdButton onClick={handleOnTest} title={'测试'}>
|
||||
<Icon component={IconOxygenTest} />
|
||||
|
||||
@@ -106,7 +106,7 @@ const SensitiveWord = () => {
|
||||
loading={loading}
|
||||
onReset={handleOnReset}
|
||||
onSave={handleOnSave}
|
||||
modifyOperationCode={'system:settings:modify:sensitive'}
|
||||
modifyOperationCode={['system:settings:modify:sensitive']}
|
||||
>
|
||||
<AntdTransfer
|
||||
listStyle={{ width: '100%', height: 400 }}
|
||||
|
||||
@@ -15,7 +15,7 @@ interface SettingsCardProps extends PropsWithChildren {
|
||||
icon: IconComponent
|
||||
title: string
|
||||
loading?: boolean
|
||||
modifyOperationCode?: string
|
||||
modifyOperationCode?: string[]
|
||||
expand?: ReactNode
|
||||
onReset?: () => void
|
||||
onSave?: () => void
|
||||
@@ -57,15 +57,15 @@ const Settings = () => {
|
||||
<HideScrollbar isShowVerticalScrollbar autoHideWaitingTime={1000}>
|
||||
<FlexBox direction={'horizontal'} className={'root-content'}>
|
||||
<FlexBox className={'root-col'}>
|
||||
<Permission operationCode={'system:settings:query:base'}>
|
||||
<Permission operationCode={['system:settings:query:base']}>
|
||||
<Base />
|
||||
</Permission>
|
||||
<Permission operationCode={'system:settings:query:sensitive'}>
|
||||
<Permission operationCode={['system:settings:query:sensitive']}>
|
||||
<SensitiveWord />
|
||||
</Permission>
|
||||
</FlexBox>
|
||||
<FlexBox className={'root-col'}>
|
||||
<Permission operationCode={'system:settings:query:mail'}>
|
||||
<Permission operationCode={['system:settings:query:mail']}>
|
||||
<Mail />
|
||||
</Permission>
|
||||
</FlexBox>
|
||||
|
||||
Reference in New Issue
Block a user