From 39ad5ccffa60e42904b7f3d2f7a60fef5977f089 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Sat, 11 Oct 2008 00:49:05 -0400 Subject: Stub out delegations Add ACI class --- ipalib/plugins/f_delegation.py | 68 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 ipalib/plugins/f_delegation.py (limited to 'ipalib/plugins/f_delegation.py') diff --git a/ipalib/plugins/f_delegation.py b/ipalib/plugins/f_delegation.py new file mode 100644 index 00000000..762df1db --- /dev/null +++ b/ipalib/plugins/f_delegation.py @@ -0,0 +1,68 @@ +# Authors: +# Rob Crittenden +# +# Copyright (C) 2008 Red Hat +# see file 'COPYING' for use and warranty information +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; version 2 only +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +""" +Frontend plugins for delegations. +""" + +from ipalib import frontend +from ipalib import crud +from ipalib.frontend import Param +from ipalib import api +from ipalib import errors +from ipa_server import servercore +from ipa_server import ipaldap +import ldap + +class delegation(frontend.Object): + """ + Delegation object. + """ + takes_params = ( + 'attributes', + 'source', + 'target', + Param('name', primary_key=True) + ) +api.register(user) + + +class delegation_add(crud.Add): + 'Add a new delegation.' +api.register(delegation_add) + + +class delegation_del(crud.Del): + 'Delete an existing delegation.' +api.register(delegation_del) + + +class delegation_mod(crud.Mod): + 'Edit an existing delegation.' +api.register(delegation_mod) + + +class delegation_find(crud.Find): + 'Search for a delegation.' +api.register(delegation_find) + + +class delegation_show(crud.Get): + 'Examine an existing delegation.' +api.register(delegation_show) -- cgit From 250734aea539f0c49c21cb1cdc0310fcbf19f65c Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 10 Oct 2008 14:38:09 -0400 Subject: Fix syntax error --- ipalib/plugins/f_delegation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipalib/plugins/f_delegation.py') diff --git a/ipalib/plugins/f_delegation.py b/ipalib/plugins/f_delegation.py index 762df1db..1fb2b4f9 100644 --- a/ipalib/plugins/f_delegation.py +++ b/ipalib/plugins/f_delegation.py @@ -40,7 +40,7 @@ class delegation(frontend.Object): 'target', Param('name', primary_key=True) ) -api.register(user) +api.register(delegation) class delegation_add(crud.Add): -- cgit From 3cbb5c6eeb131e931e4489eafd434079442ca3a7 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 21 Oct 2008 16:32:45 -0400 Subject: Don't import servercore --- ipalib/plugins/f_delegation.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'ipalib/plugins/f_delegation.py') diff --git a/ipalib/plugins/f_delegation.py b/ipalib/plugins/f_delegation.py index 1fb2b4f9..fbf8cfbf 100644 --- a/ipalib/plugins/f_delegation.py +++ b/ipalib/plugins/f_delegation.py @@ -26,9 +26,6 @@ from ipalib import crud from ipalib.frontend import Param from ipalib import api from ipalib import errors -from ipa_server import servercore -from ipa_server import ipaldap -import ldap class delegation(frontend.Object): """ -- cgit