mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Return correct record name in DNS plugin
When dnsrecord-add or dnsrecord-mod commands are used on a root zone record (it has a special name "@"), a zone name is returned instead of a special name "@". This confuses DNS part of Web UI which is then not able to manipulate records in the root zone when these commands are used. This patch fixes these 2 commands to return correct value when a root zone is modified. https://fedorahosted.org/freeipa/ticket/2627 https://fedorahosted.org/freeipa/ticket/2628
This commit is contained in:
@@ -2227,6 +2227,9 @@ class dnsrecord_add(LDAPCreate):
|
||||
param = self.params[attr]
|
||||
param.dnsrecord_add_post_callback(ldap, dn, entry_attrs, *keys, **options)
|
||||
|
||||
if self.obj.is_pkey_zone_record(*keys):
|
||||
entry_attrs[self.obj.primary_key.name] = [_dns_zone_record]
|
||||
|
||||
self.obj.postprocess_record(entry_attrs, **options)
|
||||
|
||||
return dn
|
||||
@@ -2321,6 +2324,9 @@ class dnsrecord_mod(LDAPUpdate):
|
||||
return result
|
||||
|
||||
def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
|
||||
if self.obj.is_pkey_zone_record(*keys):
|
||||
entry_attrs[self.obj.primary_key.name] = [_dns_zone_record]
|
||||
|
||||
self.obj.postprocess_record(entry_attrs, **options)
|
||||
|
||||
def interactive_prompt_callback(self, kw):
|
||||
|
||||
Reference in New Issue
Block a user