Commit 23c33d14 by kevalbhatt

ATLAS-3955: Read Type Auth, UI : detailsPage doesn't load for user who has read…

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
parent d0e246a7
...@@ -139,7 +139,13 @@ define(['require', ...@@ -139,7 +139,13 @@ define(['require',
this.entityObject = this.collection.first().toJSON(); this.entityObject = this.collection.first().toJSON();
var collectionJSON = this.entityObject.entity; var collectionJSON = this.entityObject.entity;
this.activeEntityDef = this.entityDefCollection.fullCollection.find({ name: collectionJSON.typeName }); 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")) { if (collectionJSON && _.startsWith(collectionJSON.typeName, "AtlasGlossary")) {
this.$(".termBox").hide(); this.$(".termBox").hide();
} }
......
...@@ -143,7 +143,13 @@ define(['require', ...@@ -143,7 +143,13 @@ define(['require',
this.entityObject = this.collection.first().toJSON(); this.entityObject = this.collection.first().toJSON();
var collectionJSON = this.entityObject.entity; var collectionJSON = this.entityObject.entity;
this.activeEntityDef = this.entityDefCollection.fullCollection.find({ name: collectionJSON.typeName }); 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")) { if (collectionJSON && _.startsWith(collectionJSON.typeName, "AtlasGlossary")) {
this.$(".termBox").hide(); this.$(".termBox").hide();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment