mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: should only require CREATE_ADDON when creating addon (#2204)
This commit is contained in:
parent
5c6fce0f98
commit
bd4e648eae
@ -22,7 +22,10 @@ import { AddonMultiSelector } from './AddonMultiSelector/AddonMultiSelector';
|
||||
import FormTemplate from 'component/common/FormTemplate/FormTemplate';
|
||||
import useUiConfig from '../../../hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import PermissionButton from '../../common/PermissionButton/PermissionButton';
|
||||
import { ADMIN } from '../../providers/AccessProvider/permissions';
|
||||
import {
|
||||
CREATE_ADDON,
|
||||
UPDATE_ADDON,
|
||||
} from '../../providers/AccessProvider/permissions';
|
||||
import {
|
||||
StyledForm,
|
||||
StyledFormSection,
|
||||
@ -334,7 +337,7 @@ export const AddonForm: VFC<IAddonFormProps> = ({
|
||||
type="submit"
|
||||
color="primary"
|
||||
variant="contained"
|
||||
permission={ADMIN}
|
||||
permission={editMode ? UPDATE_ADDON : CREATE_ADDON}
|
||||
>
|
||||
{submitText}
|
||||
</PermissionButton>
|
||||
|
Loading…
Reference in New Issue
Block a user