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:55:32 UTC
[atlas] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 8098bc5 ATLAS-3971 :- Move authorization check for Business Metadata before type exist check.
8098bc5 is described below
commit 8098bc5643cd45f53d2d9284785693a406d8a270
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.
---
.../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;