summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPavel Vomacka <pvomacka@redhat.com>2016-03-01 12:17:04 +0100
committerPetr Vobornik <pvoborni@redhat.com>2016-03-10 18:48:56 +0100
commitf7429a2dec96eec302629b0b792e785ba832d5ef (patch)
tree09d584202845265e95784e0181cf99343239022a /install
parent1cc582e9b8bd28deb70d29412cdaa500d904c8e3 (diff)
downloadfreeipa-f7429a2dec96eec302629b0b792e785ba832d5ef.tar.gz
freeipa-f7429a2dec96eec302629b0b792e785ba832d5ef.tar.xz
freeipa-f7429a2dec96eec302629b0b792e785ba832d5ef.zip
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>
Diffstat (limited to 'install')
-rw-r--r--install/ui/src/freeipa/user.js10
-rw-r--r--install/ui/src/freeipa/widget.js6
2 files changed, 14 insertions, 2 deletions
diff --git a/install/ui/src/freeipa/user.js b/install/ui/src/freeipa/user.js
index a920e088a..a9727f57d 100644
--- a/install/ui/src/freeipa/user.js
+++ b/install/ui/src/freeipa/user.js
@@ -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}
}
]
},
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index 41d75fe0c..fc2d6ef0b 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -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);