mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Remove HBAC source hosts from web UI
https://fedorahosted.org/freeipa/ticket/3528
This commit is contained in:
parent
583bf43367
commit
39982f6696
@ -465,73 +465,6 @@ IPA.hbacrule_details_facet = function(spec) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
|
||||||
// Source host
|
|
||||||
//
|
|
||||||
|
|
||||||
spec.fields.push(
|
|
||||||
{
|
|
||||||
type: 'radio',
|
|
||||||
name: 'sourcehostcategory',
|
|
||||||
widget: 'sourcehost.rule.sourcehostcategory'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'rule_association_table',
|
|
||||||
name: 'sourcehost_host',
|
|
||||||
widget: 'sourcehost.rule.sourcehost_host',
|
|
||||||
priority: IPA.hbac.remove_method_priority
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'rule_association_table',
|
|
||||||
name: 'sourcehost_hostgroup',
|
|
||||||
widget: 'sourcehost.rule.sourcehost_hostgroup',
|
|
||||||
priority: IPA.hbac.remove_method_priority
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
spec.widgets.push(
|
|
||||||
{
|
|
||||||
factory: IPA.collapsible_section,
|
|
||||||
name: 'sourcehost',
|
|
||||||
label: IPA.messages.objects.hbacrule.sourcehost,
|
|
||||||
widgets: [
|
|
||||||
{
|
|
||||||
factory: IPA.rule_details_widget,
|
|
||||||
name: 'rule',
|
|
||||||
radio_name: 'sourcehostcategory',
|
|
||||||
options: [
|
|
||||||
{ 'value': 'all', 'label': IPA.messages.objects.hbacrule.any_host },
|
|
||||||
{ 'value': '', 'label': IPA.messages.objects.hbacrule.specified_hosts }
|
|
||||||
],
|
|
||||||
tables: [
|
|
||||||
{ 'name': 'sourcehost_host' },
|
|
||||||
{ 'name': 'sourcehost_hostgroup' }
|
|
||||||
],
|
|
||||||
widgets: [
|
|
||||||
{
|
|
||||||
type: 'rule_association_table',
|
|
||||||
id: entity_name+'-memberuser_user',
|
|
||||||
name: 'sourcehost_host',
|
|
||||||
add_method: 'add_sourcehost',
|
|
||||||
remove_method: 'remove_sourcehost',
|
|
||||||
add_title: IPA.messages.association.add.sourcehost,
|
|
||||||
remove_title: IPA.messages.association.remove.sourcehost
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'rule_association_table',
|
|
||||||
id: entity_name+'-memberuser_group',
|
|
||||||
name: 'sourcehost_hostgroup',
|
|
||||||
add_method: 'add_sourcehost',
|
|
||||||
remove_method: 'remove_sourcehost',
|
|
||||||
add_title: IPA.messages.association.add.sourcehost,
|
|
||||||
remove_title: IPA.messages.association.remove.sourcehost
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
var that = IPA.details_facet(spec);
|
var that = IPA.details_facet(spec);
|
||||||
|
|
||||||
that.update_on_success = function(data, text_status, xhr) {
|
that.update_on_success = function(data, text_status, xhr) {
|
||||||
|
@ -85,23 +85,6 @@ IPA.hbac.test_entity = function(spec) {
|
|||||||
'description'
|
'description'
|
||||||
]
|
]
|
||||||
}).
|
}).
|
||||||
facet({
|
|
||||||
factory: IPA.hbac.test_select_facet,
|
|
||||||
name: 'sourcehost',
|
|
||||||
label: IPA.messages.objects.hbacrule.sourcehost,
|
|
||||||
managed_entity: 'host',
|
|
||||||
disable_breadcrumb: true,
|
|
||||||
facet_group: 'default',
|
|
||||||
columns: [
|
|
||||||
'fqdn',
|
|
||||||
'description',
|
|
||||||
{
|
|
||||||
name: 'has_keytab',
|
|
||||||
label: IPA.messages.objects.host.enrolled,
|
|
||||||
formatter: IPA.boolean_formatter()
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}).
|
|
||||||
facet({
|
facet({
|
||||||
factory: IPA.hbac.test_rules_facet,
|
factory: IPA.hbac.test_rules_facet,
|
||||||
name: 'rules',
|
name: 'rules',
|
||||||
@ -645,9 +628,6 @@ IPA.hbac.test_run_facet = function(spec) {
|
|||||||
facet = that.entity.get_facet('service');
|
facet = that.entity.get_facet('service');
|
||||||
facet.reset();
|
facet.reset();
|
||||||
|
|
||||||
facet = that.entity.get_facet('sourcehost');
|
|
||||||
facet.reset();
|
|
||||||
|
|
||||||
facet = that.entity.get_facet('rules');
|
facet = that.entity.get_facet('rules');
|
||||||
facet.reset();
|
facet.reset();
|
||||||
|
|
||||||
@ -704,10 +684,6 @@ IPA.hbac.test_run_facet = function(spec) {
|
|||||||
facet.save(options);
|
facet.save(options);
|
||||||
that.validate_facet(facet, options, validation_results);
|
that.validate_facet(facet, options, validation_results);
|
||||||
|
|
||||||
facet = that.entity.get_facet('sourcehost');
|
|
||||||
facet.save(options);
|
|
||||||
that.validate_facet(facet, options, validation_results);
|
|
||||||
|
|
||||||
if (!validation_results.valid) {
|
if (!validation_results.valid) {
|
||||||
var dialog = IPA.hbac.validation_dialog({
|
var dialog = IPA.hbac.validation_dialog({
|
||||||
validation_results: validation_results
|
validation_results: validation_results
|
||||||
|
@ -164,7 +164,6 @@ class i18n_messages(Command):
|
|||||||
"memberallowcmd": _("Add Allow ${other_entity} into ${entity} ${primary_key}"),
|
"memberallowcmd": _("Add Allow ${other_entity} into ${entity} ${primary_key}"),
|
||||||
"memberdenycmd": _("Add Deny ${other_entity} into ${entity} ${primary_key}"),
|
"memberdenycmd": _("Add Deny ${other_entity} into ${entity} ${primary_key}"),
|
||||||
"memberof": _("Add ${entity} ${primary_key} into ${other_entity}"),
|
"memberof": _("Add ${entity} ${primary_key} into ${other_entity}"),
|
||||||
"sourcehost": _("Add Source ${other_entity} into ${entity} ${primary_key}"),
|
|
||||||
},
|
},
|
||||||
"added": _("Items added"),
|
"added": _("Items added"),
|
||||||
"direct_membership": _("Direct Membership"),
|
"direct_membership": _("Direct Membership"),
|
||||||
@ -179,7 +178,6 @@ class i18n_messages(Command):
|
|||||||
"memberallowcmd": _("Remove Allow ${other_entity} from ${entity} ${primary_key}"),
|
"memberallowcmd": _("Remove Allow ${other_entity} from ${entity} ${primary_key}"),
|
||||||
"memberdenycmd": _("Remove Deny ${other_entity} from ${entity} ${primary_key}"),
|
"memberdenycmd": _("Remove Deny ${other_entity} from ${entity} ${primary_key}"),
|
||||||
"memberof": _("Remove ${entity} ${primary_key} from ${other_entity}"),
|
"memberof": _("Remove ${entity} ${primary_key} from ${other_entity}"),
|
||||||
"sourcehost": _("Remove Source ${other_entity} from ${entity} ${primary_key}"),
|
|
||||||
},
|
},
|
||||||
"removed": _("Items removed"),
|
"removed": _("Items removed"),
|
||||||
"show_results": _("Show Results"),
|
"show_results": _("Show Results"),
|
||||||
@ -449,7 +447,6 @@ class i18n_messages(Command):
|
|||||||
"host": _("Accessing"),
|
"host": _("Accessing"),
|
||||||
"ipaenabledflag": _("Rule status"),
|
"ipaenabledflag": _("Rule status"),
|
||||||
"service": _("Via Service"),
|
"service": _("Via Service"),
|
||||||
"sourcehost": _("From"),
|
|
||||||
"specified_hosts": _("Specified Hosts and Groups"),
|
"specified_hosts": _("Specified Hosts and Groups"),
|
||||||
"specified_services": _("Specified Services and Groups"),
|
"specified_services": _("Specified Services and Groups"),
|
||||||
"specified_users": _("Specified Users and Groups"),
|
"specified_users": _("Specified Users and Groups"),
|
||||||
|
Loading…
Reference in New Issue
Block a user