diff options
author | Patrick Uiterwijk <puiterwijk@redhat.com> | 2015-02-04 10:58:14 +0100 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2015-02-26 15:18:02 -0500 |
commit | 7ad204c13898245cdea5acfa90be83e767276994 (patch) | |
tree | 44775ee20dd1b72fa5688acf1d4e2b838f349dd6 /ipsilon/login | |
parent | 1d2fda874a7285e88b9aac870e7d9bc998fe7464 (diff) | |
download | ipsilon-7ad204c13898245cdea5acfa90be83e767276994.tar.gz ipsilon-7ad204c13898245cdea5acfa90be83e767276994.tar.xz ipsilon-7ad204c13898245cdea5acfa90be83e767276994.zip |
Add uninstallation support.
As part of this, made all plugins use a Installer baseclass.
https://fedorahosted.org/ipsilon/ticket/38
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Reviewed-by: Rob Crittenden <rcritten@redhat.com>
Diffstat (limited to 'ipsilon/login')
-rw-r--r-- | ipsilon/login/authfas.py | 7 | ||||
-rw-r--r-- | ipsilon/login/authform.py | 7 | ||||
-rw-r--r-- | ipsilon/login/authkrb.py | 7 | ||||
-rw-r--r-- | ipsilon/login/authldap.py | 7 | ||||
-rw-r--r-- | ipsilon/login/authpam.py | 7 | ||||
-rw-r--r-- | ipsilon/login/authtest.py | 7 | ||||
-rw-r--r-- | ipsilon/login/common.py | 16 |
7 files changed, 40 insertions, 18 deletions
diff --git a/ipsilon/login/authfas.py b/ipsilon/login/authfas.py index a44b470..46dd7b7 100644 --- a/ipsilon/login/authfas.py +++ b/ipsilon/login/authfas.py @@ -1,7 +1,8 @@ # Copyright (C) 2014 Ipsilon contributors, see COPYING file for license -from ipsilon.login.common import LoginFormBase, LoginManagerBase +from ipsilon.login.common import LoginFormBase, LoginManagerBase, \ + LoginManagerInstaller from ipsilon.util.plugin import PluginObject from ipsilon.util.policy import Policy from ipsilon.util import config as pconfig @@ -170,11 +171,11 @@ Form based login Manager that uses the Fedora Authentication Server return self.page -class Installer(object): +class Installer(LoginManagerInstaller): def __init__(self, *pargs): + super(Installer, self).__init__() self.name = 'fas' - self.ptype = 'login' self.pargs = pargs def install_args(self, group): diff --git a/ipsilon/login/authform.py b/ipsilon/login/authform.py index 7d84a95..808c32c 100644 --- a/ipsilon/login/authform.py +++ b/ipsilon/login/authform.py @@ -15,7 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from ipsilon.login.common import LoginFormBase, LoginManagerBase +from ipsilon.login.common import LoginFormBase, LoginManagerBase, \ + LoginManagerInstaller from ipsilon.util.plugin import PluginObject from ipsilon.util.user import UserSession from ipsilon.util import config as pconfig @@ -100,11 +101,11 @@ LoadModule authnz_pam_module modules/mod_authnz_pam.so """ -class Installer(object): +class Installer(LoginManagerInstaller): def __init__(self, *pargs): + super(Installer, self).__init__() self.name = 'form' - self.ptype = 'login' self.pargs = pargs def install_args(self, group): diff --git a/ipsilon/login/authkrb.py b/ipsilon/login/authkrb.py index e352aa2..60eeb6b 100644 --- a/ipsilon/login/authkrb.py +++ b/ipsilon/login/authkrb.py @@ -15,7 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from ipsilon.login.common import LoginPageBase, LoginManagerBase +from ipsilon.login.common import LoginPageBase, LoginManagerBase, \ + LoginManagerInstaller from ipsilon.util.plugin import PluginObject from ipsilon.util.user import UserSession from string import Template @@ -113,11 +114,11 @@ CONF_TEMPLATE = """ """ -class Installer(object): +class Installer(LoginManagerInstaller): def __init__(self, *pargs): + super(Installer, self).__init__() self.name = 'krb' - self.ptype = 'login' self.pargs = pargs def install_args(self, group): diff --git a/ipsilon/login/authldap.py b/ipsilon/login/authldap.py index 8958410..0161abc 100644 --- a/ipsilon/login/authldap.py +++ b/ipsilon/login/authldap.py @@ -1,6 +1,7 @@ # Copyright (C) 2014 Ipsilon Contributors, see COPYING for license -from ipsilon.login.common import LoginFormBase, LoginManagerBase +from ipsilon.login.common import LoginFormBase, LoginManagerBase, \ + LoginManagerInstaller from ipsilon.util.plugin import PluginObject from ipsilon.util.log import Log from ipsilon.util import config as pconfig @@ -163,11 +164,11 @@ authentication. """ return self.page -class Installer(object): +class Installer(LoginManagerInstaller): def __init__(self, *pargs): + super(Installer, self).__init__() self.name = 'ldap' - self.ptype = 'login' self.pargs = pargs def install_args(self, group): diff --git a/ipsilon/login/authpam.py b/ipsilon/login/authpam.py index 1de8e0f..104dd4c 100644 --- a/ipsilon/login/authpam.py +++ b/ipsilon/login/authpam.py @@ -15,7 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from ipsilon.login.common import LoginFormBase, LoginManagerBase +from ipsilon.login.common import LoginFormBase, LoginManagerBase, \ + LoginManagerInstaller from ipsilon.util.plugin import PluginObject from ipsilon.util import config as pconfig import pam @@ -115,11 +116,11 @@ for authentication. """ return self.page -class Installer(object): +class Installer(LoginManagerInstaller): def __init__(self, *pargs): + super(Installer, self).__init__() self.name = 'pam' - self.ptype = 'login' self.pargs = pargs def install_args(self, group): diff --git a/ipsilon/login/authtest.py b/ipsilon/login/authtest.py index 39e0f39..6c11ba1 100644 --- a/ipsilon/login/authtest.py +++ b/ipsilon/login/authtest.py @@ -15,7 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from ipsilon.login.common import LoginFormBase, LoginManagerBase +from ipsilon.login.common import LoginFormBase, LoginManagerBase, \ + LoginManagerInstaller from ipsilon.util.plugin import PluginObject from ipsilon.util import config as pconfig import cherrypy @@ -97,11 +98,11 @@ Form based TEST login Manager, DO NOT EVER ACTIVATE IN PRODUCTION """ return self.page -class Installer(object): +class Installer(LoginManagerInstaller): def __init__(self, *pargs): + super(Installer, self).__init__() self.name = 'testauth' - self.ptype = 'login' self.pargs = pargs def install_args(self, group): diff --git a/ipsilon/login/common.py b/ipsilon/login/common.py index 3002d78..4b715f3 100644 --- a/ipsilon/login/common.py +++ b/ipsilon/login/common.py @@ -292,6 +292,22 @@ class Cancel(Page): return op(*args, **kwargs) +class LoginManagerInstaller(object): + def __init__(self): + self.facility = FACILITY + self.ptype = 'login' + self.name = None + + def unconfigure(self, opts): + return + + def install_args(self, group): + raise NotImplementedError + + def configure(self, opts): + raise NotImplementedError + + class LoginMgrsInstall(object): def __init__(self): |