Skip to content

Commit 66629e4

Browse files
authored
fix: Segment override permissions (#5134)
1 parent 951b216 commit 66629e4

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

frontend/web/components/SegmentOverrideActions.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { FC, useCallback, useLayoutEffect, useRef, useState } from 'react'
2-
import classNames from 'classnames'
32

43
import useOutsideClick from 'common/useOutsideClick'
5-
import Utils from 'common/utils/utils'
6-
import Constants from 'common/constants'
7-
import Permission from 'common/providers/Permission'
84
import Button from './base/forms/Button'
95
import Icon from './Icon'
106
import ActionButton from './ActionButton'

frontend/web/components/SegmentOverrides.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ const SegmentOverrideInner = class Override extends React.Component {
4747
confirmRemove,
4848
controlValue,
4949
disabled,
50+
environmentId,
5051
hideViewSegment,
5152
index,
5253
multivariateOptions,
5354
name,
5455
onSortEnd,
5556
projectFlag,
56-
projectId,
5757
readOnly,
5858
setSegmentEditId,
5959
setShowCreateSegment,
@@ -176,9 +176,9 @@ const SegmentOverrideInner = class Override extends React.Component {
176176
)}
177177
<Row className='gap-2'>
178178
<Permission
179-
id={projectId}
180-
permission={'MANAGE_SEGMENTS'}
181-
level={'project'}
179+
id={environmentId}
180+
permission={'MANAGE_SEGMENT_OVERRIDES'}
181+
level={'environment'}
182182
>
183183
{({ permission }) =>
184184
Utils.renderWithPermission(

0 commit comments

Comments
 (0)