Skip to content

Commit

Permalink
[backend] handle inferred organizations in organization sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
marieflorescontact committed Jan 13, 2025
1 parent e2ea841 commit 4f6a7b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opencti-platform/opencti-graphql/src/database/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ export const buildDataRestrictions = async (context, user, opts = {}) => {
// Data with Empty granted_refs are not visible
// Data with granted_refs users that participate to at least one
const should = [excludedEntityMatches];
const shouldOrgs = user.allowed_organizations
const shouldOrgs = user.organizations
.map((m) => ({ match: { [buildRefRelationSearchKey(RELATION_GRANTED_TO)]: m.internal_id } }));
should.push(...shouldOrgs);
// User individual or data created by this individual must be accessible
Expand Down

0 comments on commit 4f6a7b3

Please sign in to comment.