Hi,

The patch adds new field in user add dialog. This combo box lists GIDs of posix groups
so user can choose one. It is also possible to fill a GID number
which is not in the list.

Link to the ticket: https://fedorahosted.org/freeipa/ticket/5505

--
Pavel^3 Vomacka
>From 6f6dbaea8a964bd1af50831c482cad4b66ec95c8 Mon Sep 17 00:00:00 2001
From: Pavel Vomacka <pvoma...@redhat.com>
Date: Tue, 1 Mar 2016 12:17:04 +0100
Subject: [PATCH] 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
---
 install/ui/src/freeipa/user.js     | 10 ++++++++++
 install/ui/test/data/ipa_init.json |  1 +
 ipalib/plugins/internal.py         |  1 +
 3 files changed, 12 insertions(+)

diff --git a/install/ui/src/freeipa/user.js b/install/ui/src/freeipa/user.js
index a920e088aacd02585cd131dce725272f47e4cf1c..7583215dbeb9ae7085a4cd6c48648b6705fd141d 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',
+                        label: '@i18n:objects.user.gidnumber',
+                        editable: true,
+                        searchable: true,
+                        other_entity: 'group',
+                        other_field: 'gidnumber',
+                        filter_options: {'posix': true}
                     }
                 ]
             },
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index b25fa9357d264ef5d82d24205cb6be9ec094bed7..26908a02667b0743aafbeec2f67ce79bca8a85f0 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -608,6 +608,7 @@
                             "mode_delete": "delete",
                             "mode_preserve": "preserve",
                             "noprivate": "No private group",
+                            "gidnumber": "GID number",
                             "status_confirmation": "Are you sure you want to ${action} the user?<br/>The change will take effect immediately.",
                             "status_link": "Click to ${action}",
                             "unlock": "Unlock",
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index 7156d4f47004dd702d3896ca736cc1f42227a321..b265507c33109f359a6e29610339c1a193b229bd 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -754,6 +754,7 @@ class i18n_messages(Command):
                 "mode_delete": _("delete"),
                 "mode_preserve": _("preserve"),
                 "noprivate": _("No private group"),
+                "gidnumber": _("GID number"),
                 "status_confirmation": _("Are you sure you want to ${action} the user?<br/>The change will take effect immediately."),
                 "status_link": _("Click to ${action}"),
                 "unlock": _("Unlock"),
-- 
2.5.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to