This is an automated email from the ASF dual-hosted git repository.

kbhatt 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 23c33d1  ATLAS-3955: Read Type Auth, UI : detailsPage doesn't load for 
user who has read permission for entity but no read auth for entity's type
23c33d1 is described below

commit 23c33d14d0d8e11977c38377668030ae2bbe257b
Author: kevalbhatt <[email protected]>
AuthorDate: Thu Sep 24 13:46:24 2020 +0530

    ATLAS-3955: Read Type Auth, UI : detailsPage doesn't load for user who has 
read permission for entity but no read auth for entity's type
---
 dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js | 8 +++++++-
 dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js 
b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
index 4df3562..b87d138 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -139,7 +139,13 @@ define(['require',
                     this.entityObject = this.collection.first().toJSON();
                     var collectionJSON = this.entityObject.entity;
                     this.activeEntityDef = 
this.entityDefCollection.fullCollection.find({ name: collectionJSON.typeName });
-
+                    if (!this.activeEntityDef) {
+                        Utils.backButtonClick();
+                        Utils.notifyError({
+                            content: "Unknown Entity-Type"
+                        });
+                        return true;
+                    }
                     if (collectionJSON && 
_.startsWith(collectionJSON.typeName, "AtlasGlossary")) {
                         this.$(".termBox").hide();
                     }
diff --git a/dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js 
b/dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js
index 7e140b8..bc213d5 100644
--- a/dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js
@@ -143,7 +143,13 @@ define(['require',
                     this.entityObject = this.collection.first().toJSON();
                     var collectionJSON = this.entityObject.entity;
                     this.activeEntityDef = 
this.entityDefCollection.fullCollection.find({ name: collectionJSON.typeName });
-
+                    if (!this.activeEntityDef) {
+                        Utils.backButtonClick();
+                        Utils.notifyError({
+                            content: "Unknown Entity-Type"
+                        });
+                        return true;
+                    }
                     if (collectionJSON && 
_.startsWith(collectionJSON.typeName, "AtlasGlossary")) {
                         this.$(".termBox").hide();
                     }

Reply via email to