mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
parent
bef0690a2f
commit
30def30eaf
@ -51,7 +51,6 @@ 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
|
||||
|
||||
|
||||
class user(LDAPObject):
|
||||
@ -242,16 +241,6 @@ class user_find(LDAPSearch):
|
||||
Search for users.
|
||||
"""
|
||||
|
||||
takes_options = (
|
||||
Flag('whoami',
|
||||
label=_('Self'),
|
||||
doc=_('Display user record for current Kerberos principal'),
|
||||
),
|
||||
)
|
||||
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
|
||||
if options.get('whoami', True):
|
||||
return "(&(objectclass=posixaccount)(krbprincipalname="+util.get_current_principal() + "))"
|
||||
|
||||
msg_summary = ngettext(
|
||||
'%(count)d user matched', '%(count)d users matched', 0
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user