manu@netbsd.org wrote:
Gavin Henry ghenry@suretecsystems.com wrote:
It would be best to move this dicussion to openldap-devel@openldap.org now.
Let's go...
Summarry: I've added a new feature to slapo-constraint for constraining a value attribute the the existing values of another attribute. The idea is that you can have a catalog of allowed values (eg: for titles: Mr, Mrs, Miss) and constraint an attribute to these values
Before working further on this patch (style, dod), I'd like some feeback on:
- the way it's implemented: is there rought bugs, or is the logic fine?
I haven't looked at the patch yet.
- configuration syntax: do we keep this one or do we swtich to
something else?
Something like constraint-reference attr1 attr2 might be better.
For simple directives, it's better to use positional parameters and no tag words.
Howard Chu hyc@symas.com wrote:
- configuration syntax: do we keep this one or do we swtich to
something else?
Something like constraint-reference attr1 attr2
I thought a bit about it: a useful improvement would be to contraint on the values returned by an LDAP URI. I'll have a look at it when I'll have some time.
Emmanuel Dreyfus wrote:
Howard Chu hyc@symas.com wrote:
- configuration syntax: do we keep this one or do we swtich to
something else?
Something like constraint-reference attr1 attr2
I thought a bit about it: a useful improvement would be to contraint on the values returned by an LDAP URI. I'll have a look at it when I'll have some time.
Funny you mention that. Just added support for generating select lists based on DIT content in web2ldap. Plugin class looks like attached below. I take the two attributes defined in the LDAP URL as option value,text tuple (in that order).
But I'd really like to see the constraints being defined in subschema subentry instead of slapd.conf.
Ciao, Michael.
-- Michael Ströder E-Mail: michael@stroeder.com http://www.stroeder.com
--------------------------------- snip ---------------------------------
class DepartmentNumber(DynamicLDAPSelectList): oid = 'DepartmentNumber-oid' desc = 'Test of plugin-class DynamicLDAPSelectList'
ldap_url = 'ldap:///ou=numbers,ou=Testing,dc=stroeder,dc=de?ou,description?one?'
syntax_registry.registerAttrType( DepartmentNumber.oid,[ '2.16.840.1.113730.3.1.2', # ] )
Howard Chu hyc@symas.com wrote:
- configuration syntax: do we keep this one or do we swtich to
something else?
Something like constraint-reference attr1 attr2 might be better.
For simple directives, it's better to use positional parameters and no tag words.
How are you going to handle the regex constraint case? Do you also want to change its syntax? That will break setups on upgrade, except if we adopt a new syntax while retaining the old one for backard compatibility.