mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add method to generate DN from attribute directly, without making RDN first.
This commit is contained in:
parent
21ccdec860
commit
24790748fe
@ -318,6 +318,16 @@ class ldap2(CrudBackend):
|
||||
parent_dn = self.normalize_dn(parent_dn)
|
||||
return u'%s,%s' % (rdn, parent_dn)
|
||||
|
||||
def make_dn_from_attr(self, attr, value, parent_dn=''):
|
||||
"""
|
||||
Make distinguished name from attribute.
|
||||
|
||||
Keyword arguments:
|
||||
parent_dn -- DN of the parent entry (default '')
|
||||
"""
|
||||
rdn = self.make_rdn_from_attr(attr, value)
|
||||
return self.make_dn_from_rdn(rdn, parent_dn)
|
||||
|
||||
def make_dn(self, entry_attrs, primary_key='cn', parent_dn=''):
|
||||
"""
|
||||
Make distinguished name from entry attributes.
|
||||
|
Loading…
Reference in New Issue
Block a user