diff --git a/repository/src/main/java/org/apache/atlas/discovery/AtlasAuthorization.java b/repository/src/main/java/org/apache/atlas/discovery/AtlasAuthorization.java index 247901ab86..89fc85d9b3 100644 --- a/repository/src/main/java/org/apache/atlas/discovery/AtlasAuthorization.java +++ b/repository/src/main/java/org/apache/atlas/discovery/AtlasAuthorization.java @@ -116,7 +116,7 @@ public static void verifyAccess(String guid, String action) throws AtlasBaseExce try { if (!isAccessAllowed(guid, action)) { - throw new AtlasBaseException(AtlasErrorCode.UNAUTHORIZED_ACCESS, RequestContext.getCurrentUser(), guid); + throw new AtlasBaseException(AtlasErrorCode.UNAUTHORIZED_ACCESS, userName, action + ":" + guid); } } catch (AtlasBaseException e) { throw e; diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java index 6321bd0212..e8fe8e7b82 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java @@ -104,7 +104,6 @@ import static java.lang.Boolean.FALSE; import static org.apache.atlas.AtlasConfiguration.STORE_DIFFERENTIAL_AUDITS; import static org.apache.atlas.bulkimport.BulkImportResponse.ImportStatus.FAILED; -import static org.apache.atlas.discovery.AtlasAuthorization.isCreateAccessAllowed; import static org.apache.atlas.discovery.AtlasAuthorization.verifyAccess; import static org.apache.atlas.discovery.AtlasAuthorization.verifyDeleteEntityAccess; import static org.apache.atlas.model.instance.AtlasEntity.Status.ACTIVE;