You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ni...@apache.org on 2020/10/08 06:56:59 UTC
[atlas] branch branch-2.0 updated: ATLAS-3971 :- Move authorization
check for Business Metadata before type exist check.
This is an automated email from the ASF dual-hosted git repository.
nixon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 92b7071 ATLAS-3971 :- Move authorization check for Business Metadata before type exist check.
92b7071 is described below
commit 92b70715e0bf50fe7c3dcc5227182202f8fe0c6e
Author: nixonrodrigues <ni...@apache.org>
AuthorDate: Wed Oct 7 10:37:44 2020 +0530
ATLAS-3971 :- Move authorization check for Business Metadata before type exist check.
(cherry picked from commit 8098bc5643cd45f53d2d9284785693a406d8a270)
---
.../repository/store/graph/v2/AtlasBusinessMetadataDefStoreV2.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasBusinessMetadataDefStoreV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasBusinessMetadataDefStoreV2.java
index 23964f4..d0d54af 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasBusinessMetadataDefStoreV2.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasBusinessMetadataDefStoreV2.java
@@ -69,6 +69,8 @@ public class AtlasBusinessMetadataDefStoreV2 extends AtlasAbstractDefStoreV2<Atl
DataTypes.TypeCategory.BUSINESS_METADATA.name());
}
+ AtlasAuthorizationUtils.verifyAccess(new AtlasTypeAccessRequest(AtlasPrivilege.TYPE_CREATE, businessMetadataDef), "create businessMetadata-def ", businessMetadataDef.getName());
+
AtlasVertex ret = typeDefStore.findTypeVertexByName(businessMetadataDef.getName());
if (ret != null) {
@@ -115,7 +117,6 @@ public class AtlasBusinessMetadataDefStoreV2 extends AtlasAbstractDefStoreV2<Atl
}
}
- AtlasAuthorizationUtils.verifyAccess(new AtlasTypeAccessRequest(AtlasPrivilege.TYPE_CREATE, businessMetadataDef), "create businessMetadata-def ", businessMetadataDef.getName());
AtlasVertex vertex = (preCreateResult == null) ? preCreate(businessMetadataDef) : preCreateResult;