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
This commit is contained in:
Petr Vobornik
2012-07-30 14:32:54 +02:00
committed by Martin Kosek
parent 271043ccf7
commit d536b3824e
3 changed files with 20 additions and 1 deletions

View File

@@ -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 || {};

View File

@@ -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"

View File

@@ -407,6 +407,7 @@ class i18n_messages(Command):
"details": _("Group Settings"),
"external": _("External"),
"make_external": _("Change to external group"),
"make_posix": _("Change to POSIX group"),
"normal": _("Normal"),
"posix": _("POSIX"),
"type": _("Group Type"),