mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-25 06:38:02 -05:00
Add field for group id in user add dialog
Add new field in user add dialog. This combo box lists all posix groups so user can choose one. It is also possible to fill a GID number which is not in the list. https://fedorahosted.org/freeipa/ticket/5505 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
1 parent
1cc582e9b8
commit
f7429a2dec
2 files changed
+14
-2
No files matched your search
@@ -447,6 +447,16 @@ return {
|
||||
name: 'noprivate',
|
||||
label: '@i18n:objects.user.noprivate',
|
||||
metadata: '@mc-opt:user_add:noprivate'
|
||||
},
|
||||
{
|
||||
$type: 'entity_select',
|
||||
name: 'gidnumber',
|
||||
editable: true,
|
||||
searchable: true,
|
||||
other_entity: 'group',
|
||||
other_field: 'gidnumber',
|
||||
label_field: 'cn',
|
||||
filter_options: {'posix': true}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -4299,6 +4299,7 @@ IPA.entity_select_widget = function(spec) {
|
||||
|
||||
that.other_entity = IPA.get_entity(spec.other_entity);
|
||||
that.other_field = spec.other_field;
|
||||
that.label_field = spec.label_field || spec.other_field;
|
||||
|
||||
that.options = spec.options || [];
|
||||
that.filter_options = spec.filter_options || {};
|
||||
@@ -4339,9 +4340,10 @@ IPA.entity_select_widget = function(spec) {
|
||||
for (var i=0; i<data.result.count; i++) {
|
||||
var entry = entries[i];
|
||||
var values = adapter.load(entry, that.other_field);
|
||||
var value = values[0];
|
||||
var label = adapter.load(entry, that.label_field);
|
||||
var option = { label: label[0], value: values[0] };
|
||||
|
||||
options.push(value);
|
||||
options.push(option);
|
||||
}
|
||||
|
||||
that.set_options(options);
|
||||
|
||||
Reference in new issue
Block a user