mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui: hide applied to hosts tab for Default Trust View
because applying Default Trust view on hosts is not allowed https://fedorahosted.org/freeipa/ticket/4615 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
This commit is contained in:
parent
2e27f1ee69
commit
d3f46d4e78
@ -211,7 +211,8 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
|||||||
* Facet header
|
* Facet header
|
||||||
* @property {facet.facet_header}
|
* @property {facet.facet_header}
|
||||||
*/
|
*/
|
||||||
that.header = spec.header || IPA.facet_header({ facet: that });
|
that.header = builder.build('', spec.header || {}, {},
|
||||||
|
{ $pre_ops: [{ facet: that }], $factory: IPA.facet_header });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hard override for `needs_update()` logic. When set, `needs_update`
|
* Hard override for `needs_update()` logic. When set, `needs_update`
|
||||||
@ -1400,6 +1401,8 @@ exp.facet_header = IPA.facet_header = function(spec) {
|
|||||||
that.load();
|
that.load();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
that.facet_header_set_pkey = that.set_pkey;
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -37,7 +37,9 @@ define([
|
|||||||
* @class
|
* @class
|
||||||
* @singleton
|
* @singleton
|
||||||
*/
|
*/
|
||||||
var idviews = IPA.idviews = {};
|
var idviews = IPA.idviews = {
|
||||||
|
DEFAULT_TRUST_VIEW: 'Default Trust View'
|
||||||
|
};
|
||||||
|
|
||||||
var make_spec = function() {
|
var make_spec = function() {
|
||||||
return {
|
return {
|
||||||
@ -82,6 +84,7 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
$type: 'details',
|
$type: 'details',
|
||||||
|
header: idviews.idview_facet_header,
|
||||||
actions: [
|
actions: [
|
||||||
'delete'
|
'delete'
|
||||||
],
|
],
|
||||||
@ -104,6 +107,7 @@ return {
|
|||||||
{
|
{
|
||||||
$type: 'nested_search',
|
$type: 'nested_search',
|
||||||
facet_group: 'overrides',
|
facet_group: 'overrides',
|
||||||
|
header: idviews.idview_facet_header,
|
||||||
nested_entity: 'idoverrideuser',
|
nested_entity: 'idoverrideuser',
|
||||||
search_all_entries: true,
|
search_all_entries: true,
|
||||||
label: '@mo:idoverrideuser.label',
|
label: '@mo:idoverrideuser.label',
|
||||||
@ -123,6 +127,7 @@ return {
|
|||||||
{
|
{
|
||||||
$type: 'nested_search',
|
$type: 'nested_search',
|
||||||
facet_group: 'overrides',
|
facet_group: 'overrides',
|
||||||
|
header: idviews.idview_facet_header,
|
||||||
nested_entity: 'idoverridegroup',
|
nested_entity: 'idoverridegroup',
|
||||||
search_all_entries: true,
|
search_all_entries: true,
|
||||||
label: '@mo:idoverridegroup.label',
|
label: '@mo:idoverridegroup.label',
|
||||||
@ -371,6 +376,25 @@ idviews.appliedtohosts_facet = function(spec, no_init) {
|
|||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
idviews.idview_facet_header = function(spec) {
|
||||||
|
|
||||||
|
var that = mod_facet.facet_header(spec);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set pkeys and hides 'appliedtohosts' facet for 'Default Trust View'
|
||||||
|
* @param {string} value pkey
|
||||||
|
*/
|
||||||
|
that.set_pkey = function(value) {
|
||||||
|
|
||||||
|
that.facet_header_set_pkey(value);
|
||||||
|
var display = value === idviews.DEFAULT_TRUST_VIEW ? 'none' : '';
|
||||||
|
$('.facet-group[name="appliedto"]', that.facet_tabs).
|
||||||
|
css('display', display);
|
||||||
|
};
|
||||||
|
|
||||||
|
return that;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply Id view on hosts on hostgroup action base class
|
* Apply Id view on hosts on hostgroup action base class
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user