Skip to content

Commit

Permalink
[backend] drafts bug fixes (#6577)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyCloarec authored and labo-flg committed Oct 15, 2024
1 parent af2574f commit 264e053
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import useEnterpriseEdition from '../../../utils/hooks/useEnterpriseEdition';
import ItemBoolean from '../../../components/ItemBoolean';
import Breadcrumbs from '../../../components/Breadcrumbs';
import useApiMutation from '../../../utils/hooks/useApiMutation';
import type { Theme } from '../../../components/Theme';
import useSensitiveModifications from '../../../utils/hooks/useSensitiveModifications';
import Transition from '../../../components/Transition';
import type { Theme } from '../../../components/Theme';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@ type MeUser implements BasicObject & InternalObject {
submenu_show_icons: Boolean
submenu_auto_collapse: Boolean
monochrome_labels: Boolean
draft_context: String
can_manage_sensitive_config: Boolean
draft_context: String
}

type SessionDetail {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
baseType,
createdAt,
creators,
draftIds,
entityLocationType,
entityType,
files,
Expand All @@ -27,6 +28,7 @@ export const INTERNAL_ATTRIBUTES = [
id.name,
internalId.name,
standardId.name,
draftIds.name,
xOpenctiStixIds.name,
iAliasedIds.name,
// Auditing
Expand Down
6 changes: 3 additions & 3 deletions opencti-platform/opencti-graphql/src/http/httpServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ const createHttpServer = async () => {
executeContext.synchronizedUpsert = req.headers['synchronized-upsert'] === 'true'; // If full sync needs to be done
try {
const user = await authenticateUserFromRequest(executeContext, req, res);
if (isFeatureEnabled('DRAFT_WORKSPACE') && !executeContext.draft_context) {
executeContext.draft_context = user.draft_context;
}
if (user) {
if (isFeatureEnabled('DRAFT_WORKSPACE') && !executeContext.draft_context) {
executeContext.draft_context = user.draft_context;
}
executeContext.user = userWithOrigin(req, user);
}
} catch (error) {
Expand Down

0 comments on commit 264e053

Please sign in to comment.