Commit bae32755 by Abhishek Kadam Committed by nixonrodrigues

ATLAS-2766: Turn off hyperlinks for entities with no entity-read access in search result display

parent eb895a62
......@@ -627,7 +627,11 @@ define(['require',
nameHtml = "",
name = Utils.getName(obj);
if (obj.guid) {
if (obj.guid == "-1") {
nameHtml = '<span title="' + name + '">' + name + '</span>';
} else {
nameHtml = '<a title="' + name + '" href="#!/detailPage/' + obj.guid + (that.fromView ? "?from=" + that.fromView : "") + '">' + name + '</a>';
}
} else {
nameHtml = '<span title="' + name + '">' + name + '</span>';
}
......@@ -826,6 +830,9 @@ define(['require',
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
var obj = model.toJSON();
if (obj.guid == "-1") {
return
}
if (obj.status && Enums.entityStateReadOnly[obj.status]) {
return '<div class="readOnly">' + CommonViewFunction.tagForTable(obj); + '</div>';
} else {
......@@ -854,6 +861,9 @@ define(['require',
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
var obj = model.toJSON();
if (obj.guid == "-1") {
return
}
if (obj.typeName && !(_.startsWith(obj.typeName, "AtlasGlossary"))) {
if (obj.status && Enums.entityStateReadOnly[obj.status]) {
return '<div class="readOnly">' + CommonViewFunction.termForTable(obj); + '</div>';
......
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