pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone
Blob Blame History Raw
From 1dfdb32cbd73a3b1144645c0208fee88b3530172 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jcholast@redhat.com>
Date: Mon, 17 Aug 2015 09:39:21 +0200
Subject: [PATCH] baseldap: Allow overriding member param label in
 LDAPModMember

https://fedorahosted.org/freeipa/ticket/5214

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
---
 ipalib/plugins/baseldap.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 36a5d5f4918828a97b0b30d4613819f777722de8..31f38946afcbb51638bcab68a6e74ec309eba0e4 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -1652,6 +1652,7 @@ class LDAPModMember(LDAPQuery):
     """
     member_attributes = ['member']
     member_param_doc = _('%s')
+    member_param_label = _('member %s')
     member_count_out = ('%i member processed.', '%i members processed.')
 
     def get_options(self):
@@ -1662,9 +1663,9 @@ class LDAPModMember(LDAPQuery):
                 ldap_obj = self.api.Object[ldap_obj_name]
                 name = to_cli(ldap_obj_name)
                 doc = self.member_param_doc % ldap_obj.object_name_plural
+                label = self.member_param_label % ldap_obj.object_name
                 yield Str('%s*' % name, cli_name='%ss' % name, doc=doc,
-                          label=_('member %s') % ldap_obj.object_name,
-                          csv=True, alwaysask=True)
+                          label=label, csv=True, alwaysask=True)
 
     def get_member_dns(self, **options):
         dns = {}
-- 
2.4.3