Skip to content

Commit

Permalink
Merge pull request #3175 from atlanhq/DG-1533
Browse files Browse the repository at this point in the history
DG-1533 Only check create permission on source/target domains
  • Loading branch information
nikhilbonte21 authored May 31, 2024
2 parents 15b6b5f + c8caf98 commit dbd336e
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,11 @@ public abstract class AbstractDomainPreProcessor implements PreProcessor {
protected void isAuthorized(AtlasEntityHeader sourceDomain, AtlasEntityHeader targetDomain) throws AtlasBaseException {

if(sourceDomain != null){
// source -> CREATE + UPDATE + DELETE
AtlasAuthorizationUtils.verifyAccess(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_CREATE, sourceDomain),
"create on source Domain: ", sourceDomain.getAttribute(NAME));

AtlasAuthorizationUtils.verifyAccess(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_UPDATE, sourceDomain),
"update on source Domain: ", sourceDomain.getAttribute(NAME));
}

if(targetDomain != null){
// target -> CREATE + UPDATE + DELETE
AtlasAuthorizationUtils.verifyAccess(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_CREATE, targetDomain),
"create on target Domain: ", targetDomain.getAttribute(NAME));

AtlasAuthorizationUtils.verifyAccess(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_UPDATE, targetDomain),
"update on target Domain: ", targetDomain.getAttribute(NAME));
}
Expand Down

0 comments on commit dbd336e

Please sign in to comment.