Skip to content

Commit

Permalink
Merge branch 'DG-1533' into beta-helper-1533
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilbonte21 committed Jun 11, 2024
2 parents e67703e + 5d9fdd7 commit 742198c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,21 @@ protected void isAuthorizedToMove(String typeName, AtlasEntityHeader sourceDomai
AtlasEntityHeader headerToAuth = new AtlasEntityHeader(typeName);

if (sourceDomain != null) {
//Update sub-domains on source parent
//Update sub-domains/product on source parent
String qualifiedNameToAuth = sourceDomain.getAttribute(QUALIFIED_NAME) + qualifiedNameToAuthSuffix;
headerToAuth.setAttribute(QUALIFIED_NAME, qualifiedNameToAuth);

AtlasAuthorizationUtils.verifyAccess(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_UPDATE, headerToAuth),
DATA_DOMAIN_ENTITY_TYPE, AtlasPrivilege.ENTITY_UPDATE, sourceDomain.getAttribute(NAME));
AtlasPrivilege.ENTITY_UPDATE.name(), " " , typeName, " : ", qualifiedNameToAuth);
}

if (targetDomain != null) {
//Create sub-domains on target parent
//Create sub-domains/product on target parent
String qualifiedNameToAuth = targetDomain.getAttribute(QUALIFIED_NAME) + qualifiedNameToAuthSuffix;
headerToAuth.setAttribute(QUALIFIED_NAME, qualifiedNameToAuth);

AtlasAuthorizationUtils.verifyAccess(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_CREATE, headerToAuth),
DATA_DOMAIN_ENTITY_TYPE, AtlasPrivilege.ENTITY_CREATE, targetDomain.getAttribute(NAME));
AtlasPrivilege.ENTITY_CREATE.name(), " " , typeName, " : ", qualifiedNameToAuth);
}
}

Expand Down

0 comments on commit 742198c

Please sign in to comment.