Skip to content

Commit 533f14b

Browse files
[backend] Adapt dynamic filtering for special instance control (#4538)
1 parent 7f62490 commit 533f14b

File tree

1 file changed

+4
-4
lines changed
  • opencti-platform/opencti-graphql/src/utils

1 file changed

+4
-4
lines changed

opencti-platform/opencti-graphql/src/utils/access.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ export const userFilterStoreElements = async (context: AuthContext, user: AuthUs
440440
// If element is shared, user must have a matching sharing organization
441441
return elementOrganizations.some((r) => userOrganizations.includes(r));
442442
}
443-
// If no platform organization is set, user can access empty sharing and dedicated sharing
444-
return elementOrganizations.length === 0 || elementOrganizations.some((r) => userOrganizations.includes(r));
443+
// If no platform organization is set, user can
444+
return true;
445445
});
446446
};
447447
return telemetry(context, user, 'FILTERING store filter', {
@@ -491,8 +491,8 @@ export const isUserCanAccessStixElement = async (context: AuthContext, user: Aut
491491
// If element is shared, user must have a matching sharing organization
492492
return elementOrganizations.some((r) => userOrganizations.includes(r));
493493
}
494-
// If no platform organization is set, user can access empty sharing and dedicated sharing
495-
return elementOrganizations.length === 0 || elementOrganizations.some((r) => userOrganizations.includes(r));
494+
// If no platform organization is set, user can access
495+
return true;
496496
};
497497

498498
// region member access

0 commit comments

Comments
 (0)