From d536b3824e6a2cee18164187f596089b97b3c00f Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Mon, 30 Jul 2012 14:32:54 +0200 Subject: Make group posix New option for creating plain user group posix group. External group can't be made posix. https://fedorahosted.org/freeipa/ticket/2338 --- install/ui/group.js | 19 ++++++++++++++++++- install/ui/test/data/ipa_init.json | 1 + 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'install/ui') diff --git a/install/ui/group.js b/install/ui/group.js index f8d8e666f..769df0a8e 100644 --- a/install/ui/group.js +++ b/install/ui/group.js @@ -56,10 +56,11 @@ IPA.group.entity = function(spec) { ], actions: [ IPA.select_action, + IPA.group.make_posix_action, IPA.group.make_external_action, IPA.delete_action ], - header_actions: ['select_action', 'make_external', 'delete'], + header_actions: ['select_action', 'make_posix', 'make_external', 'delete'], state: { evaluators: [ IPA.object_class_evaluator @@ -197,6 +198,22 @@ IPA.group_adder_dialog = function(spec) { return that; }; +IPA.group.make_posix_action = function(spec) { + + spec = spec || {}; + spec.name = spec.name || 'make_posix'; + spec.method = spec.method || 'mod'; + spec.label = spec.label || IPA.messages.objects.group.make_posix; + spec.disable_cond = spec.disable_cond || ['oc_posixgroup', 'oc_ipaexternalgroup']; + spec.options = spec.options || { + posix: true + }; + + var that = IPA.object_action(spec); + + return that; +}; + IPA.group.make_external_action = function(spec) { spec = spec || {}; diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json index e0c22bf2d..6111881ee 100644 --- a/install/ui/test/data/ipa_init.json +++ b/install/ui/test/data/ipa_init.json @@ -270,6 +270,7 @@ "details": "Group Settings", "external": "External", "make_external": "Change to external group", + "make_posix": "Change to POSIX group", "normal": "Normal", "posix": "POSIX", "type": "Group Type" -- cgit