Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[frontend] Stream opening fix capa
  • Loading branch information
Archidoit committed Mar 6, 2026
commit a4c8c441d43560e0e1150d02a2d7f1d39f709d71
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { deserializeFilterGroupForFrontend, isFilterGroupNotEmpty } from '../../
import ItemCopy from '../../../../components/ItemCopy';
import ItemBoolean from '../../../../components/ItemBoolean';
import Security from '../../../../utils/Security';
import { TAXIIAPI_SETCOLLECTIONS } from '../../../../utils/hooks/useGranted';
import { TAXIIAPI } from '../../../../utils/hooks/useGranted';
import FieldOrEmpty from '../../../../components/FieldOrEmpty';
import { EMPTY_VALUE } from '../../../../utils/String';

Expand Down Expand Up @@ -127,7 +127,7 @@ class StreamLineLineComponent extends Component {
divider={true}
disablePadding
secondaryAction={(
<Security needs={[TAXIIAPI_SETCOLLECTIONS]}>
<Security needs={[TAXIIAPI]}>
<StreamPopover
streamCollection={node}
paginationOptions={paginationOptions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import useApiMutation from '../../../../utils/hooks/useApiMutation';
import useDeletion from '../../../../utils/hooks/useDeletion';
import { deleteNode } from '../../../../utils/store';
import Drawer from '../../common/drawer/Drawer';
import Security from '../../../../utils/Security';
import StreamCollectionEdition, { streamCollectionMutationFieldPatch } from './StreamCollectionEdition';
import DeleteDialog from '../../../../components/DeleteDialog';
import { TAXIIAPI_SETCOLLECTIONS } from '../../../../utils/hooks/useGranted';

const streamCollectionPopoverDeletionMutation = graphql`
mutation StreamPopoverDeletionMutation($id: ID!) {
Expand Down Expand Up @@ -116,36 +118,44 @@ const StreamCollectionPopover: FunctionComponent<StreamCollectionPopoverProps> =
open={Boolean(anchorEl)}
onClose={handleClose}
>
<MenuItem onClick={handleOnOff}>
{t_i18n(streamCollection.stream_live ? 'Stop' : 'Start')}
</MenuItem>
<MenuItem onClick={handleOpenUpdate}>
{t_i18n('Update')}
</MenuItem>
<MenuItem onClick={handleOpenDelete}>
{t_i18n('Delete')}
</MenuItem>
<Security needs={[TAXIIAPI_SETCOLLECTIONS]}>
<>
<MenuItem onClick={handleOnOff}>
{t_i18n(streamCollection.stream_live ? 'Stop' : 'Start')}
</MenuItem>
<MenuItem onClick={handleOpenUpdate}>
{t_i18n('Update')}
</MenuItem>
<MenuItem onClick={handleOpenDelete}>
{t_i18n('Delete')}
</MenuItem>
</>
</Security>
<MenuItem onClick={handleOpenStream}>
<ListItemIcon>
<OpenInNewOutlined fontSize="small" />
</ListItemIcon>
<ListItemText>{t_i18n('Open stream')}</ListItemText>
</MenuItem>
</Menu>
<Drawer
open={displayUpdate}
title={t_i18n('Update a live stream')}
onClose={handleCloseUpdate}
>
<StreamCollectionEdition
streamCollection={streamCollection}
/>
</Drawer>
<DeleteDialog
deletion={deletion}
submitDelete={submitDelete}
message={t_i18n('Do you want to delete this live stream?')}
/>
<Security needs={[TAXIIAPI_SETCOLLECTIONS]}>
<>
<Drawer
open={displayUpdate}
title={t_i18n('Update a live stream')}
onClose={handleCloseUpdate}
>
<StreamCollectionEdition
streamCollection={streamCollection}
/>
</Drawer>
<DeleteDialog
deletion={deletion}
submitDelete={submitDelete}
message={t_i18n('Do you want to delete this live stream?')}
/>
</>
</Security>
</div>
);
};
Expand Down
Loading