Oh, okay. I didn't realize the ipalib plugin affected the UI. Sure, I can share 
it. So in /usr/lib/python2.7/site-packages/ipalib/plugins/altemail.py is the 
following. I have also (at one point) had a validation function and a 
precallback (both currently not used when trying to simplify/test). Validation 
just checked for a validly formatted email address (I left the 'from' statement 
below which imports that library). The precallback was to ensure that the 
objectClass 'mailrecipient' was added to the user before trying to add the 
mailAlternateAddress attribute (It was causing some other error when it was 
already there..need to sort that out later, as well). Anyway, the ipalib plugin:

from ipalib.plugins import user
from ipalib.parameters import Str
from ipalib import _
from validate_email_address import validate_email

user.user.takes_params = user.user.takes_params + (
   Str('mailalternateaddress*',
       cli_name='altemail',
       label=_('E-mail Alias'),
       doc=_('E-Mail Alias'),
       minlength=7,
       multivalue=True,
   ),
)


----- Original Message -----
From: "Rob Crittenden" <rcrit...@redhat.com>

I don't know a lot about the UI javascript but there are two pieces to
code: the plugin to define the attribute and the UI to consume it.

It sounds like you've done both. What I'm interested in is how you
configured the plugin. Can you share the code?

The UI downloads all the available commands and options as metadata and
uses that to help drive some of the interactions.

rob

> 
> Thanks!
> ----- Original Message -----
> From: "Rob Crittenden" <rcrit...@redhat.com>
> 
> Do you have this configured in the user plugin? Perhaps some other piece
> of the UI is confused because of either a missing or misconfigured value
> for the attribute in the metadata.
> 
> If you do, how is the param configured?
> 
> rob
>

-- 
Manage your subscription for the Freeipa-users mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project

Reply via email to