From a5c8dcd996f5b3e39b9b1306453e2a8de4c3a8c0 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Fri, 17 Aug 2012 11:00:37 +0200 Subject: Fix managedBy label for DNS zone Even though managedBy output parameter was only used for failed host managedBy memberships, it was defined in global baseldap.py classes. Incorrect label was then being displayed also for DNS zone per-zone permission attribute with the same name. Move managedBy output parameter to host plugin. Define proper managedBy output parameter in DNS plugin to improve clarity of this attribute. https://fedorahosted.org/freeipa/ticket/2946 --- ipalib/plugins/dns.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ipalib/plugins/dns.py') diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index 991eb016..bd637dcd 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -1531,6 +1531,12 @@ def default_zone_update_policy(zone): else: return get_dns_forward_zone_update_policy(api.env.realm) +dnszone_output_params = ( + Str('managedby', + label=_('Managedby permission'), + ), +) + class dnszone(LDAPObject): """ DNS Zone, container for resource records. @@ -1717,6 +1723,7 @@ api.register(dnszone) class dnszone_add(LDAPCreate): __doc__ = _('Create new DNS zone (SOA record).') + has_output_params = LDAPCreate.has_output_params + dnszone_output_params takes_options = LDAPCreate.takes_options + ( Flag('force', label=_('Force'), @@ -1783,12 +1790,16 @@ api.register(dnszone_del) class dnszone_mod(LDAPUpdate): __doc__ = _('Modify DNS zone (SOA record).') + has_output_params = LDAPUpdate.has_output_params + dnszone_output_params + api.register(dnszone_mod) class dnszone_find(LDAPSearch): __doc__ = _('Search for DNS zones (SOA records).') + has_output_params = LDAPSearch.has_output_params + dnszone_output_params + def args_options_2_params(self, *args, **options): # FIXME: Check that name_from_ip is valid. This is necessary because # custom validation rules, including _validate_ipnet, are not @@ -1833,6 +1844,8 @@ api.register(dnszone_find) class dnszone_show(LDAPRetrieve): __doc__ = _('Display information about a DNS zone (SOA record).') + has_output_params = LDAPRetrieve.has_output_params + dnszone_output_params + api.register(dnszone_show) -- cgit