mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Use DN class in get_primary_key_from_dn to return decoded value
This commit is contained in:
committed by
Rob Crittenden
parent
032b77ac23
commit
8c95eb68d2
@@ -33,6 +33,7 @@ from ipalib.cli import to_cli, from_cli
|
||||
from ipalib import output
|
||||
from ipalib.text import _
|
||||
from ipalib.util import json_serialize
|
||||
from ipalib.dn import *
|
||||
|
||||
global_output_params = (
|
||||
Str('member',
|
||||
@@ -318,7 +319,9 @@ class LDAPObject(Object):
|
||||
return ''
|
||||
except errors.NotFound:
|
||||
pass
|
||||
return dn[len(self.primary_key.name) + 1:dn.find(',')]
|
||||
# DN object assures we're returning a decoded (unescaped) value
|
||||
dn = DN(dn)
|
||||
return dn[self.primary_key.name]
|
||||
|
||||
def get_ancestor_primary_keys(self):
|
||||
if self.parent_object:
|
||||
|
||||
Reference in New Issue
Block a user