[Freeipa-devel] [PATCH] 1046 add e-mail by default
Martin Kosek
mkosek at redhat.com
Fri Sep 7 11:40:18 UTC 2012
On Thu, 2012-09-06 at 11:42 -0400, Rob Crittenden wrote:
> Martin Kosek wrote:
> > On 08/24/2012 07:54 PM, Rob Crittenden wrote:
> >> We weren't automatically creating the mail attribute despite having the default
> >> e-mail domain. This patch will add it to all new users.
> >>
> >> To disable creating this set the default e-mail domain to empty in ipa config.
> >>
> >> rob
> >>
> >
> > 1) Patch needs a rebase
> >
> > 2) There are 2 test cases where new default mail attribute was not added:
> >
> > ======================================================================
> > FAIL: test_user[34]: user_find: Search for "tuser2" with manager "tuser1"
> > ----------------------------------------------------------------------
> > ...
> > extra keys = ['mail']
> > ...
> >
> > ======================================================================
> > FAIL: test_user[75]: user_add: Create 2nd admin user "admin2"
> > ----------------------------------------------------------------------
> > ...
> > extra keys = ['mail']
> > ...
> >
> > 3) Some code could be simplified:
> >
> > This:
> > + if 'ipadefaultemaildomain' in config:
> > + defaultdomain = config['ipadefaultemaildomain'][0]
> > + else:
> > + defaultdomain = None
> >
> > To this:
> > defaultdomain = config.get('ipadefaultemaildomain', [None])[0]
> >
> >
> > This:
> > if m.find('@') == -1 ...
> >
> > To this:
> > if '@' not in m ...
> >
> > IMHO, it is more readable than the find method.
> >
> > 3) When default e-mail domain is removed from config, users cannot be added any
> > more when e-mail is not explicitly specified:
> >
> > # ipa config-mod --emaildomain=
> > Maximum username length: 32
> > Home directory base: /home
> > Default shell: /bin/sh
> > Default users group: ipausers
> > Search time limit: 2
> > Search size limit: 100
> > User search fields: uid,givenname,sn,telephonenumber,ou,title
> > Group search fields: cn,description
> > Enable migration mode: FALSE
> > Certificate Subject base: O=IDM.LAB.BOS.REDHAT.COM
> > Password Expiration Notification (days): 4
> > Password plugin features: AllowNThash
> > SELinux user map order:
> > guest_u:s0$xguest_u:s0$user_u:s0-s0:c0.c1023$staff_u:s0-s0:c0.c1023$unconfined_u:s0-s0:c0.c1023
> > Default SELinux user: guest_u:s0
> > PAC type: MS-PAC
> >
> > # ipa user-add --first=Foo --last=Bar fbar
> > ipa: ERROR: invalid 'email': invalid e-mail format: fbar
> >
> > Martin
> >
>
> Rebased, issues addressed.
>
> rob
Yup, its OK now.
ACK. I just had to squash an attached one-liner which updates range
tests I committed yesterday.
Pushed to master, ipa-3-0.
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-missing-mail-attribute-to-range-tests.patch
Type: text/x-patch
Size: 1051 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120907/567a9880/attachment.bin>
More information about the Freeipa-devel
mailing list