Skip to content

Domain policy must be evaluated during PolicyEvaluator - #23302

Merged
sonika-shah merged 20 commits into
mainfrom
domain_policy
Sep 24, 2025
Merged

sonika-shah merged 20 commits into
mainfrom
domain_policy

Conversation

@harshach

@harshach harshach commented Sep 9, 2025

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

mohityadav766
mohityadav766 previously approved these changes Sep 15, 2025
…few entities for domain check + other remaining DQ related domain fixes
public static final Comparator<CustomProperty> compareCustomProperty =
Comparator.comparing(CustomProperty::getName);

private static final String DOMAIN_ONLY_ACCESS_ROLE = "DomainOnlyAccessRole";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the whole idea of the PR was to remove this hardcoding?!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mohityadav766 this is being used for post filtering by domain in list api ,for cases like listing glossary/tags/domain - where the result can belong to multiple cross-domains

we need to handle it like this in EntityUtil and cannot be handled from policy evaluator

if (resourceContext.getEntity() == null || resourceContext.getEntity().getId() == null) {
      LOG.info(
          "hasDomain() - List operation detected (no specific resource), returning true for post-filtering");
      return true;
    }

mohityadav766
mohityadav766 previously approved these changes Sep 23, 2025
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Changes have been cherry-picked to the 1.9.10 branch.

This branch was previously deployed

1 inactive deployment
test — 178ad220 Deployed Sep 24, 2025 by sonika-shah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants