-
Notifications
You must be signed in to change notification settings - Fork 3
feat(saas-api): Graphql schema for FE integration for tenant management #2176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/microsoft-365-audit-events
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |
| import java.time.LocalDate; | ||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
| import java.util.Set; | ||
| import java.util.regex.Pattern; | ||
|
|
||
| /** | ||
|
|
@@ -30,6 +31,7 @@ public class CustomOrganizationRepositoryImpl implements CustomOrganizationRepos | |
| private static final String ID_FIELD = "_id"; | ||
| private static final String UPDATED_AT_FIELD = "updatedAt"; | ||
| private static final String CURSOR_SEPARATOR = "_"; | ||
| private static final String ORGANIZATION_ID_FIELD = "organizationId"; | ||
|
|
||
| private static final List<String> SORTABLE_FIELDS = List.of( | ||
| "_id", | ||
|
|
@@ -100,6 +102,11 @@ public Query buildOrganizationQuery(OrganizationQueryFilter filter, String searc | |
| if (filter.getLastActivityTo() != null) { | ||
| criteriaList.add(Criteria.where(UPDATED_AT_FIELD).lte(filter.getLastActivityTo())); | ||
| } | ||
|
|
||
| Set<String> excludedOrganizationIds = filter.getExcludeOrganizationIds(); | ||
| if (excludedOrganizationIds != null && !excludedOrganizationIds.isEmpty()) { | ||
| criteriaList.add(Criteria.where(ORGANIZATION_ID_FIELD).nin(excludedOrganizationIds)); | ||
| } | ||
|
Comment on lines
+106
to
+109
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🦩 🟠 [warn/recommended] excludeOrganizationIds filters on organizationId while other filters/sort use _id and other fields — verify field exists and is indexed The new exclude filter is applied via Criteria.where(ORGANIZATION_ID_FIELD).nin(excludedOrganizationIds), i.e. against the document's Evidence🤖 Prompt for AI agentsconfidence: 35 — react 👍/👎 to teach the reviewer |
||
| } else { | ||
| // No filter provided — default to ACTIVE status | ||
| criteriaList.add(new Criteria().orOperator( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the idea of this filter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to return a list of customers that are not assigned to a cloud provider to the FE