diff options
author | Rob Crittenden <rcritten@redhat.com> | 2010-09-24 09:55:03 -0400 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-09-24 09:55:03 -0400 |
commit | ed56112023fb308a31149b3297fb826fd69deac8 (patch) | |
tree | bbf70e600654f08b5f7f629c13e4fd6e106e9e57 | |
parent | af36e5ea900b4414e436eed9d59b608aea84b8da (diff) | |
download | freeipa-ed56112023fb308a31149b3297fb826fd69deac8.tar.gz freeipa-ed56112023fb308a31149b3297fb826fd69deac8.tar.xz freeipa-ed56112023fb308a31149b3297fb826fd69deac8.zip |
Use the principal from the context in whoami.
ticket 227
-rw-r--r-- | ipalib/plugins/user.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py index 1cd28c9d8..293045b55 100644 --- a/ipalib/plugins/user.py +++ b/ipalib/plugins/user.py @@ -51,7 +51,7 @@ from ipalib import api, errors from ipalib import Flag, Int, Password, Str from ipalib.plugins.baseldap import * from ipalib import _, ngettext -from ipalib import util +from ipalib.request import context class user(LDAPObject): @@ -251,7 +251,7 @@ class user_find(LDAPSearch): def pre_callback(self, ldap, filter, entry_attrs, attrs_list, *keys, **options): if options.get('whoami'): return "(&(objectclass=posixaccount)(krbprincipalname=%s))"%\ - util.get_current_principal() + getattr(context, 'principal') return filter msg_summary = ngettext( |