mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01:00
fix: remove project list from edit component
This commit is contained in:
parent
8c82a6bceb
commit
e5a9825871
@ -63,7 +63,7 @@ const EditFeature = () => {
|
||||
};
|
||||
|
||||
const formatApiCode = () => {
|
||||
return `curl --location --request PUT '${
|
||||
return `curl --location --request PATCH '${
|
||||
uiConfig.unleashUrl
|
||||
}/api/admin/projects/${projectId}/features/${featureId}' \\
|
||||
--header 'Authorization: INSERT_API_KEY' \\
|
||||
|
@ -1,7 +1,4 @@
|
||||
import {
|
||||
CREATE_FEATURE,
|
||||
UPDATE_FEATURE,
|
||||
} from '../../../providers/AccessProvider/permissions';
|
||||
import { CREATE_FEATURE } from '../../../providers/AccessProvider/permissions';
|
||||
import Input from '../../../common/Input/Input';
|
||||
import { Button } from '@material-ui/core';
|
||||
import { useStyles } from './FeatureForm.styles';
|
||||
@ -53,7 +50,7 @@ const FeatureForm: React.FC<IFeatureToggleForm> = ({
|
||||
const { hasAccess } = useContext(AccessContext);
|
||||
const { featureTypes } = useFeatureTypes();
|
||||
const { permissions } = useUser();
|
||||
const editable = hasAccess(UPDATE_FEATURE, project);
|
||||
const editable = hasAccess(CREATE_FEATURE, project) && mode !== 'Edit';
|
||||
|
||||
const renderToggleDescription = () => {
|
||||
return featureTypes.find(toggle => toggle.id === type)?.description;
|
||||
|
@ -47,6 +47,15 @@ Array [
|
||||
"title": "Copy",
|
||||
"type": "protected",
|
||||
},
|
||||
Object {
|
||||
"component": [Function],
|
||||
"layout": "main",
|
||||
"menu": Object {},
|
||||
"parent": "/projects",
|
||||
"path": "/projects/:projectId/features2/:featureId/settings",
|
||||
"title": "Edit Feature",
|
||||
"type": "protected",
|
||||
},
|
||||
Object {
|
||||
"component": [Function],
|
||||
"flags": "E",
|
||||
|
Loading…
Reference in New Issue
Block a user