#2015 Attribute cn in user is required but it's marked optional
Closed: Fixed None Opened 12 years ago by pvoborni.

Problem:
Attribute cn in user is required but it's marked optional.

Consequences:
In Web UI field 'Full name' is not marked as required (*). When cleared on update following error message is shown: 'missing attribute "cn" required by object class "person"'

Expected result:
Attribute cn will not be marked as optional. -> correct metadata will be send to Web UI


Same issue with uidNumber, gidNumber, and homeDirectory.

Same issue with the following attributes:
- group: gidNumber
- DNS zone: idnsSOAserial, idnsSOArefresh, idnsSOAretry, idnsSOAexpire, idnsSOAminimum
- config: ipausersearchfields, ipadefaultprimarygroup, ipagroupsearchfields, ipauserobjectclasses, ipagroupobjectclasses

I think we'll need to update the interactive requires, and potentially the marshaling code to allow empty values if there is a default_from provided.

The issue comes in the difference in creating new records and modifying existing ones.

When adding new entries we don't want them to have to provide a homeDirectory, for example, so we allow them to but provide one if they don't. But we don't want them to clear it out.

homeDirectory is optional in the schema, so setting that blank is actually ok.

Looking more closely these can't all be lumped together.

gidNumber and uidNumber are required by schema so always need to be there. We don't create these with a default_from but we do have a default, so perhaps any default or autofill setting needs to always be populated.

The DNS zone options are similar, they always need to be populated but provide a reasonable default when added.

The config options should be enforced by the framework. They are optional in that we don't want the user to provide the values for everything when they modify one thing, but they can't leave something unset. So maybe a notEmpty parameter rule is in order. Getting it right could be tricky as rules tend not to have a lot of context.

Metadata Update from @pvoborni:
- Issue assigned to rcritten
- Issue set to the milestone: FreeIPA 3.0 Core Effort - 2011/12

7 years ago

Login to comment on this ticket.

Metadata