Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Segment override permissions #5134

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading