Skip to content
Draft
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
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2725,6 +2725,7 @@
"Monitoring": "Überwachung",
"Monitoring | Ingestion | Data": "Überwachung | Ingestion | Daten",
"Monochrome labels and entity types": "Monochrome Etiketten und Entitätstypen",
"Unsubscribed news feed types": "Abgemeldete Newsfeed-Typen",
"Month": "Monat",
"month": "monat",
"Month day": "Monatstag",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2725,6 +2725,7 @@
"Monitoring": "Monitoring",
"Monitoring | Ingestion | Data": "Monitoring | Ingestion | Data",
"Monochrome labels and entity types": "Monochrome labels and entity types",
"Unsubscribed news feed types": "Unsubscribed news feed types",
"Month": "Month",
"month": "month",
"Month day": "Month day",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2725,6 +2725,7 @@
"Monitoring": "Monitorización",
"Monitoring | Ingestion | Data": "Monitorización | Ingestión | Datos",
"Monochrome labels and entity types": "Etiquetas monocromáticas y tipos de entidades",
"Unsubscribed news feed types": "Tipos de fuentes de noticias cancelados",
"Month": "Mes",
"month": "mes",
"Month day": "Día del mes",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2725,6 +2725,7 @@
"Monitoring": "Suivi",
"Monitoring | Ingestion | Data": "Surveillance | Ingestion | Données",
"Monochrome labels and entity types": "Étiquettes monochromes et types d'entités",
"Unsubscribed news feed types": "Types de fils d'actualité désabonnés",
"Month": "Mois",
"month": "mois",
"Month day": "Jour du mois",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -2725,6 +2725,7 @@
"Monitoring": "Monitoraggio",
"Monitoring | Ingestion | Data": "Monitoraggio | Ingestione | Dati",
"Monochrome labels and entity types": "Etichette monocromatiche e tipi di entità",
"Unsubscribed news feed types": "Tipi di feed di notizie disiscritti",
"Month": "Mese",
"month": "mese",
"Month day": "Giorno del mese",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2725,6 +2725,7 @@
"Monitoring": "モニタリング",
"Monitoring | Ingestion | Data": "モニタリング|インジェスト|データ",
"Monochrome labels and entity types": "モノクロラベルとエンティティタイプ",
"Unsubscribed news feed types": "登録解除されたニュースフィードタイプ",
"Month": "月",
"month": "月",
"Month day": "月日",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -2725,6 +2725,7 @@
"Monitoring": "모니터링 중",
"Monitoring | Ingestion | Data": "모니터링 | 수집 | 데이터",
"Monochrome labels and entity types": "단색 레이블 및 엔티티 유형",
"Unsubscribed news feed types": "구독 취소된 뉴스 피드 유형",
"Month": "월",
"month": "월",
"Month day": "월일",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -2725,6 +2725,7 @@
"Monitoring": "Мониторинг",
"Monitoring | Ingestion | Data": "Мониторинг | Всасывание | Данные",
"Monochrome labels and entity types": "Монохромные этикетки и типы сущностей",
"Unsubscribed news feed types": "Отписанные типы новостных лент",
"Month": "Месяц",
"month": "месяц",
"Month day": "День месяца",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -2725,6 +2725,7 @@
"Monitoring": "监测",
"Monitoring | Ingestion | Data": "监测 | 输入 | 数据",
"Monochrome labels and entity types": "单色标签和实体类型",
"Unsubscribed news feed types": "已取消订阅的新闻源类型",
"Month": "月",
"month": "月",
"Month day": "月日",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,37 @@ const ProfileOverviewComponent = (props) => {
</Card>
) : null}
<Card title={t('Authentication')}>
{(settings.available_news_feed_types?.length > 0) && (
<Card title={t('XTM Hub Newsfeeds')}>
<ListItem style={{ padding: '20px 0 0 0' }}>
<ListItemText primary={t('Receive all XTM Hub newsfeeds')} />
<Switch
checked={!me.unsubscribed_news_feed_types?.includes('*')}
onChange={(_, value) => handleSubmitField(
'unsubscribed_news_feed_types',
value ? [] : ['*'],
)}
/>
</ListItem>
{settings.available_news_feed_types.map((feedType) => (
<ListItem key={feedType} style={{ padding: '10px 0 0 0' }}>
<ListItemText primary={t(feedType)} />
<Switch
disabled={me.unsubscribed_news_feed_types?.includes('*')}
checked={!me.unsubscribed_news_feed_types?.includes(feedType)}
onChange={(_, value) => {
const current = (me.unsubscribed_news_feed_types ?? [])
.filter((type) => type !== '*');
const next = value
? current.filter((type) => type !== feedType)
: [...current, feedType];
handleSubmitField('unsubscribed_news_feed_types', next);
}}
/>
</ListItem>
))}
</Card>
)}
<div style={{ float: 'right', marginTop: -5 }}>
{useOtp && (
<Button
Expand Down Expand Up @@ -619,6 +650,7 @@ const ProfileOverview = createFragmentContainer(ProfileOverviewComponent, {
submenu_show_icons
submenu_auto_collapse
monochrome_labels
unsubscribed_news_feed_types
personal_notifiers {
id
name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,7 @@ type User implements BasicObject & InternalObject {
submenu_show_icons: Boolean
submenu_auto_collapse: Boolean
monochrome_labels: Boolean
unsubscribed_news_feed_types: [String!]
editContext: [EditUserContext!]
creator: Creator
}
Expand Down Expand Up @@ -1859,6 +1860,7 @@ type MeUser implements BasicObject & InternalObject {
submenu_show_icons: Boolean
submenu_auto_collapse: Boolean
monochrome_labels: Boolean
unsubscribed_news_feed_types: [String!]
can_manage_sensitive_config: Boolean
draftContext: DraftWorkspace
}
Expand Down Expand Up @@ -1894,6 +1896,7 @@ input UserAddInput {
submenu_show_icons: Boolean
submenu_auto_collapse: Boolean
monochrome_labels: Boolean
unsubscribed_news_feed_types: [String!]
groups: [ID!]
user_confidence_level: ConfidenceLevelInput
prevent_default_groups: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,7 @@ type User implements BasicObject & InternalObject {
submenu_show_icons: Boolean
submenu_auto_collapse: Boolean
monochrome_labels: Boolean
unsubscribed_news_feed_types: [String!]
# Technical
editContext: [EditUserContext!]
creator: Creator
Expand Down Expand Up @@ -1784,6 +1785,7 @@ type MeUser implements BasicObject & InternalObject {
submenu_show_icons: Boolean
submenu_auto_collapse: Boolean
monochrome_labels: Boolean
unsubscribed_news_feed_types: [String!]
can_manage_sensitive_config: Boolean
draftContext: DraftWorkspace
}
Expand Down Expand Up @@ -1813,6 +1815,7 @@ input UserAddInput {
submenu_show_icons: Boolean
submenu_auto_collapse: Boolean
monochrome_labels: Boolean
unsubscribed_news_feed_types: [String!]
groups: [ID!]
user_confidence_level: ConfidenceLevelInput
prevent_default_groups: Boolean
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-graphql/src/domain/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const ME_USER_MODIFIABLE_ATTRIBUTES = [
'submenu_show_icons',
'submenu_auto_collapse',
'monochrome_labels',
'unsubscribed_news_feed_types',
'password',
'draft_context',
];
Expand Down
7 changes: 7 additions & 0 deletions opencti-platform/opencti-graphql/src/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16443,6 +16443,7 @@ export type MeUser = BasicObject & InternalObject & {
submenu_show_icons?: Maybe<Scalars['Boolean']['output']>;
theme?: Maybe<Scalars['String']['output']>;
unit_system?: Maybe<UnitSystem>;
unsubscribed_news_feed_types?: Maybe<Array<Scalars['String']['output']>>;
user_confidence_level?: Maybe<ConfidenceLevel>;
user_email: Scalars['String']['output'];
};
Expand Down Expand Up @@ -29757,6 +29758,7 @@ export type Settings = BasicObject & InternalObject & IntlSettings & ThemeSettin
__typename?: 'Settings';
activity_listeners?: Maybe<Array<Member>>;
analytics_google_analytics_v4?: Maybe<Scalars['String']['output']>;
available_news_feed_types?: Maybe<Array<Scalars['String']['output']>>;
cert_auth?: Maybe<CertAuthConfig>;
created_at: Scalars['DateTime']['output'];
editContext?: Maybe<Array<EditUserContext>>;
Expand Down Expand Up @@ -35727,6 +35729,7 @@ export type User = BasicObject & InternalObject & {
submenu_show_icons?: Maybe<Scalars['Boolean']['output']>;
theme?: Maybe<Scalars['String']['output']>;
unit_system?: Maybe<UnitSystem>;
unsubscribed_news_feed_types?: Maybe<Array<Scalars['String']['output']>>;
updated_at: Scalars['DateTime']['output'];
user_confidence_level?: Maybe<ConfidenceLevel>;
user_email: Scalars['String']['output'];
Expand Down Expand Up @@ -36016,6 +36019,7 @@ export type UserAddInput = {
submenu_show_icons?: InputMaybe<Scalars['Boolean']['input']>;
theme?: InputMaybe<Scalars['String']['input']>;
unit_system?: InputMaybe<Scalars['String']['input']>;
unsubscribed_news_feed_types?: InputMaybe<Array<Scalars['String']['input']>>;
user_confidence_level?: InputMaybe<ConfidenceLevelInput>;
user_email?: InputMaybe<Scalars['String']['input']>;
user_service_account?: InputMaybe<Scalars['Boolean']['input']>;
Expand Down Expand Up @@ -46299,6 +46303,7 @@ export type MeUserResolvers<ContextType = any, ParentType extends ResolversParen
submenu_show_icons?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
theme?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
unit_system?: Resolver<Maybe<ResolversTypes['UnitSystem']>, ParentType, ContextType>;
unsubscribed_news_feed_types?: Resolver<Maybe<Array<ResolversTypes['String']>>, ParentType, ContextType>;
user_confidence_level?: Resolver<Maybe<ResolversTypes['ConfidenceLevel']>, ParentType, ContextType>;
user_email?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
Expand Down Expand Up @@ -49468,6 +49473,7 @@ export type SessionDetailResolvers<ContextType = any, ParentType extends Resolve
export type SettingsResolvers<ContextType = any, ParentType extends ResolversParentTypes['Settings'] = ResolversParentTypes['Settings']> = ResolversObject<{
activity_listeners?: Resolver<Maybe<Array<ResolversTypes['Member']>>, ParentType, ContextType>;
analytics_google_analytics_v4?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
available_news_feed_types?: Resolver<Maybe<Array<ResolversTypes['String']>>, ParentType, ContextType>;
cert_auth?: Resolver<Maybe<ResolversTypes['CertAuthConfig']>, ParentType, ContextType>;
created_at?: Resolver<ResolversTypes['DateTime'], ParentType, ContextType>;
editContext?: Resolver<Maybe<Array<ResolversTypes['EditUserContext']>>, ParentType, ContextType>;
Expand Down Expand Up @@ -51419,6 +51425,7 @@ export type UserResolvers<ContextType = any, ParentType extends ResolversParentT
submenu_show_icons?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
theme?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
unit_system?: Resolver<Maybe<ResolversTypes['UnitSystem']>, ParentType, ContextType>;
unsubscribed_news_feed_types?: Resolver<Maybe<Array<ResolversTypes['String']>>, ParentType, ContextType>;
updated_at?: Resolver<ResolversTypes['DateTime'], ParentType, ContextType>;
user_confidence_level?: Resolver<Maybe<ResolversTypes['ConfidenceLevel']>, ParentType, ContextType>;
user_email?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ const internalObjectsAttributes: { [k: string]: Array<AttributeDefinition<any>>
{ name: 'submenu_show_icons', label: 'Show submenu icons', type: 'boolean', mandatoryType: 'no', editDefault: false, multiple: false, upsert: false, isFilterable: false },
{ name: 'submenu_auto_collapse', label: 'Auto collapse submenus', type: 'boolean', mandatoryType: 'no', editDefault: false, multiple: false, upsert: false, isFilterable: false },
{ name: 'monochrome_labels', label: 'Monochrome labels and entity types', type: 'boolean', mandatoryType: 'no', editDefault: false, multiple: false, upsert: false, isFilterable: false },
{ name: 'unsubscribed_news_feed_types', label: 'Unsubscribed news feed types', type: 'string', format: 'short', mandatoryType: 'no', editDefault: false, multiple: true, upsert: false, isFilterable: false },
{
name: 'user_confidence_level',
label: 'User Confidence Level',
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-graphql/src/resolvers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const userResolvers = {
submenu_show_icons: (current) => current.submenu_show_icons ?? false,
submenu_auto_collapse: (current) => current.submenu_auto_collapse ?? true,
monochrome_labels: (current) => current.monochrome_labels ?? false,
unsubscribed_news_feed_types: (current) => current.unsubscribed_news_feed_types ?? [],
groups: (current, args, context) => userGroupsPaginated(context, context.user, current.id, args),
objectOrganization: (current, args, context) => userOrganizationsPaginated(context, context.user, current.id, args),
default_dashboards: (current, _, context) => findDefaultDashboards(context, context.user, current),
Expand Down
Loading