Skip to content
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

DG-1697: Adding endpoint for linking/unlink policy #3348

Merged
merged 35 commits into from
Jul 29, 2024

Conversation

arpit-at
Copy link

Change description

Created two new endpoints in the metastore:

  1. Unlink Policies
Endpoint: POST alternate/{policy-id}/unlink-business-policy
Body: {"unlinkGuids":["assetId1", "assetId2"]}

2 Link Policies

Endpoint: POST alternate/{policy-id}/link-business-policy
Body: {"linkGuids":["assetId1", "assetId2"]}

These endpoints link or unlink policies from a set of asset IDs with minimal operations:

  1. Verify if the request is from a service account.
  2. Loop through all assets.
  3. Load each asset.
  4. Link or unlink the policy.
  5. Increment or decrement the asset policies count.

Type of change

  • Bug fix (fixes an issue)
  • New feature (adds functionality)

Related issues

Checklists

Development

  • Lint rules pass locally
  • Application changes have been tested thoroughly
  • Automated tests covering modified code pass

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

Code review

  • [ x] Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
  • "Ready for review" label attached and reviewers assigned
  • Changes have been reviewed by at least one other contributor
  • Pull request linked to task tracker where applicable

bichitra95 and others added 21 commits July 2, 2024 11:34
DQ-278 Add default value to optional fields status and template_version
If propogate option is false then restrict option are ingored
and only checked if propogate if true
AM-1406 | Add git action for jira id in PR title
DG-1530 Changing the wildcard pattern for indexsearch to be more efficient
If a restrict via lineage or restrict via hierarchy option is
missing while updating the set classification, this will use
the previously saved value. This is done to avoid bypassing
the validation if setting the options one by one.
DQ-306 Make data_source optional requirement
DG-1671 Set archival status on delete
MESH-40 Fixed the TODOs left by previous part of the task -> indexsearch for All Domain policies Personas takes longer to respond
…fication

DG-1682 - Fix: Ignore classification option validation when propogate is false
@arpit-at arpit-at changed the title Policyendpointsmasterss DG-1697: Adding endpoint for linking/unlink policy Jul 19, 2024
@arpit-at arpit-at merged commit e154fe8 into staging Jul 29, 2024
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants