mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Make get_dn parameter list more generic. Fix Attribute name regex.
The old name regex made it impossible to have Attribute instances with names composed of more than two words separated by underscores.
This commit is contained in:
committed by
Rob Crittenden
parent
4b08770b78
commit
dc23be6878
@@ -795,9 +795,9 @@ class Object(HasParam):
|
|||||||
continue
|
continue
|
||||||
yield param
|
yield param
|
||||||
|
|
||||||
def get_dn(self, primary_key):
|
def get_dn(self, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
Construct an LDAP DN from a primary_key.
|
Construct an LDAP DN.
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError('%s.get_dn()' % self.name)
|
raise NotImplementedError('%s.get_dn()' % self.name)
|
||||||
|
|
||||||
@@ -878,7 +878,7 @@ class Attribute(Plugin):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
m = re.match(
|
m = re.match(
|
||||||
'^([a-z][a-z0-9]+)_([a-z][a-z0-9]+)$',
|
'^([a-z][a-z0-9]+)_([a-z][a-z0-9]+(?:_[a-z][a-z0-9]+)*)$',
|
||||||
self.__class__.__name__
|
self.__class__.__name__
|
||||||
)
|
)
|
||||||
assert m
|
assert m
|
||||||
|
|||||||
Reference in New Issue
Block a user