mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-09-03 20:52:56 -05:00
291: Temporarily reverted Rob's changes in public.py and plugins/examples.py
This commit is contained in:
@@ -24,8 +24,7 @@ Some example plugins.
|
||||
|
||||
from ipalib import public
|
||||
from ipalib import api
|
||||
from ipalib import servercore
|
||||
import ldap
|
||||
|
||||
|
||||
# Hypothetical functional commands (not associated with any object):
|
||||
class krbtest(public.Command):
|
||||
@@ -40,11 +39,8 @@ api.register(discover)
|
||||
# Register some methods for the 'user' object:
|
||||
class user_add(public.Method):
|
||||
'Add a new user.'
|
||||
def execute(self, **kw):
|
||||
return 1
|
||||
api.register(user_add)
|
||||
|
||||
|
||||
class user_del(public.Method):
|
||||
'Delete an existing user.'
|
||||
api.register(user_del)
|
||||
@@ -55,9 +51,6 @@ api.register(user_mod)
|
||||
|
||||
class user_find(public.Method):
|
||||
'Search the users.'
|
||||
def execute(self, **kw):
|
||||
result = servercore.get_sub_entry(servercore.basedn, "uid=%s" % kw['uid'], ["*"])
|
||||
return result
|
||||
api.register(user_find)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -338,7 +338,7 @@ class Command(plugable.Plugin):
|
||||
kw = self.normalize(**kw)
|
||||
kw.update(self.get_default(**kw))
|
||||
self.validate(**kw)
|
||||
return self.execute(**kw)
|
||||
self.execute(**kw)
|
||||
|
||||
def smart_option_order(self):
|
||||
def get_key(option):
|
||||
|
||||
Reference in New Issue
Block a user