Add widget for kerberos aliases to service page

Also changes the name of option which is send during adding new service from
'krbprincipalname' to 'krbcanonicalname'.

https://fedorahosted.org/freeipa/ticket/5927

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
Pavel Vomacka 2016-06-30 14:13:53 +02:00 committed by Petr Vobornik
parent 62c4e15d16
commit 2ec59b7f23

View File

@ -58,7 +58,7 @@ return {
facets: [ facets: [
{ {
$type: 'search', $type: 'search',
columns: [ 'krbprincipalname' ] columns: [ 'krbcanonicalname' ]
}, },
{ {
$type: 'details', $type: 'details',
@ -67,7 +67,14 @@ return {
{ {
name: 'details', name: 'details',
fields: [ fields: [
'krbprincipalname', {
$type: 'krb_principal_multivalued',
name: 'krbprincipalname',
item_name: 'principal',
child_spec: {
$type: 'krb_principal'
}
},
{ {
name: 'service', name: 'service',
label: '@i18n:objects.service.service', label: '@i18n:objects.service.service',
@ -435,14 +442,14 @@ IPA.service_adder_dialog = function(spec) {
var init = function() { var init = function() {
//small hack - krbprincipalname should not be displayed. This way //small hack - krbcanonicalname should not be displayed. This way
//creation of associated widget is skipped. //creation of associated widget is skipped.
//In future it would be better split section definion into widget and //In future it would be better split section definion into widget and
//fields definition and create custom field with two associated //fields definition and create custom field with two associated
//widgets - 'service' and 'host' with this dialog's save logic. //widgets - 'service' and 'host' with this dialog's save logic.
that.builder.build_field({ that.builder.build_field({
$type: 'field', $type: 'field',
name: 'krbprincipalname', name: 'krbcanonicalname',
required: false required: false
}); });
}; };
@ -455,7 +462,7 @@ IPA.service_adder_dialog = function(spec) {
field = that.fields.get_field('host'); field = that.fields.get_field('host');
var host = field.save()[0]; var host = field.save()[0];
record['krbprincipalname'] = [ service+'/'+host ]; record['krbcanonicalname'] = [ service+'/'+host ];
field = that.fields.get_field('force'); field = that.fields.get_field('force');
record['force'] = field.save(); record['force'] = field.save();