WebUI: Fix 'user not found' traceback on user ID override details page

Disable link to user page from user ID override in case it is in 'Default Trust View'

Ticket: https://pagure.io/freeipa/issue/7139

Signed-off-by: Serhii Tsymbaliuk <stsymbal@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
Serhii Tsymbaliuk
2019-06-12 13:27:16 +02:00
parent b5bb436e9f
commit 881ec5a317

View File

@@ -472,6 +472,17 @@ idviews.id_override_user_details_facet = function(spec) {
that.refresh();
};
that.load = function(data) {
var is_trust_view = that.get_pkeys()[0] === idviews.DEFAULT_TRUST_VIEW;
var widget = that.fields.get_field('ipaanchoruuid').widget;
// Disable link for AD users
widget.no_check = is_trust_view;
widget.is_link = !is_trust_view;
that.details_facet_load(data);
};
return that;
};