fix: frontend permission check (#784)
This commit is contained in:
parent
440cf63317
commit
2c77a74c40
19 changed files with 186 additions and 74 deletions
|
|
@ -13,6 +13,7 @@ export type KeyValidatorProps = {
|
|||
forms: Form[]
|
||||
keyFrom: KeyFrom
|
||||
onSave: (v: ValidateValue) => Promise<boolean | undefined>
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
const KeyValidator = ({
|
||||
|
|
@ -22,6 +23,7 @@ const KeyValidator = ({
|
|||
forms,
|
||||
keyFrom,
|
||||
onSave,
|
||||
disabled,
|
||||
}: KeyValidatorProps) => {
|
||||
const triggerKey = `plugins/${type}`
|
||||
const { eventEmitter } = useEventEmitterContextContext()
|
||||
|
|
@ -85,10 +87,11 @@ const KeyValidator = ({
|
|||
onSave={handleSave}
|
||||
onAdd={handleAdd}
|
||||
onEdit={handleEdit}
|
||||
disabled={disabled}
|
||||
/>
|
||||
</div>
|
||||
{
|
||||
isOpen && (
|
||||
isOpen && !disabled && (
|
||||
<div className='px-4 py-3'>
|
||||
{
|
||||
forms.map(form => (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue