Skip to content

Commit

Permalink
[frontend] Fix file indexing accessing to external file (#6943)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kedae authored Jun 7, 2024
1 parent 603b2e2 commit 86c5026
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const SearchIndexedFileLineComponent: FunctionComponent<SearchIndexedFileLineCom
const { t_i18n } = useFormatter();
let entityLink = node.entity ? `${resolveLink(node.entity.entity_type)}/${node.entity.id}` : '';
const isGrantedToFiles = useGranted([KNOWLEDGE_KNUPLOAD, KNOWLEDGE_KNGETEXPORT]);
if (entityLink && isGrantedToFiles) {
if (entityLink && isGrantedToFiles && node.entity?.entity_type !== 'External-Reference') {
entityLink = entityLink.concat('/files');
}
return (
Expand Down
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/src/utils/Entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export const resolveLink = (type = 'unknown'): string | null => {
return '/dashboard/analyses/opinions';
case 'Report':
return '/dashboard/analyses/reports';
case 'External-Reference':
return '/dashboard/analyses/external_references';
case 'Grouping':
return '/dashboard/analyses/groupings';
case 'Course-Of-Action':
Expand Down

0 comments on commit 86c5026

Please sign in to comment.