Repository: atlas
Updated Branches:
  refs/heads/branch-1.0 cdbd62df1 -> 51dcce487


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

Signed-off-by: nixonrodrigues <ni...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/51dcce48
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/51dcce48
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/51dcce48

Branch: refs/heads/branch-1.0
Commit: 51dcce487a393c206e63ed4bf336cd9c09e41303
Parents: cdbd62d
Author: Abhishek Kadam <abhishek.kada...@gmail.com>
Authored: Tue Jun 26 19:04:55 2018 +0530
Committer: nixonrodrigues <ni...@apache.org>
Committed: Tue Jun 26 19:19:57 2018 +0530

----------------------------------------------------------------------
 .../public/js/views/search/SearchResultLayoutView.js    | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/51dcce48/dashboardv2/public/js/views/search/SearchResultLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js 
b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 7fa088b..24117af 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -627,7 +627,11 @@ define(['require',
                                 nameHtml = "",
                                 name = Utils.getName(obj);
                             if (obj.guid) {
-                                nameHtml = '<a title="' + name + '" 
href="#!/detailPage/' + obj.guid + (that.fromView ? "?from=" + that.fromView : 
"") + '">' + name + '</a>';
+                                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>';

Reply via email to