Skip to content

Commit

Permalink
fix: Segment override permissions (#5134)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-ssg authored Feb 19, 2025
1 parent 951b216 commit 66629e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 0 additions & 4 deletions frontend/web/components/SegmentOverrideActions.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { FC, useCallback, useLayoutEffect, useRef, useState } from 'react'
import classNames from 'classnames'

import useOutsideClick from 'common/useOutsideClick'
import Utils from 'common/utils/utils'
import Constants from 'common/constants'
import Permission from 'common/providers/Permission'
import Button from './base/forms/Button'
import Icon from './Icon'
import ActionButton from './ActionButton'
Expand Down
8 changes: 4 additions & 4 deletions frontend/web/components/SegmentOverrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ const SegmentOverrideInner = class Override extends React.Component {
confirmRemove,
controlValue,
disabled,
environmentId,
hideViewSegment,
index,
multivariateOptions,
name,
onSortEnd,
projectFlag,
projectId,
readOnly,
setSegmentEditId,
setShowCreateSegment,
Expand Down Expand Up @@ -176,9 +176,9 @@ const SegmentOverrideInner = class Override extends React.Component {
)}
<Row className='gap-2'>
<Permission
id={projectId}
permission={'MANAGE_SEGMENTS'}
level={'project'}
id={environmentId}
permission={'MANAGE_SEGMENT_OVERRIDES'}
level={'environment'}
>
{({ permission }) =>
Utils.renderWithPermission(
Expand Down

0 comments on commit 66629e4

Please sign in to comment.