Commit c9d3c65d authored by Łukasz Nowak's avatar Łukasz Nowak

Rename to Remote User plugin.

parent 9e030f0f
......@@ -52,25 +52,25 @@ from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery
#Form for new plugin in ZMI
manage_addERP5CertificateAuthorityAuthenticationPluginForm = PageTemplateFile(
'www/ERP5Security_addERP5CertificateAuthorityAuthenticationPlugin', globals(),
__name__='manage_addERP5CertificateAuthorityAuthenticationPluginForm')
manage_addERP5RemoteUserAuthenticationPluginForm = PageTemplateFile(
'www/ERP5Security_addERP5RemoteUserAuthenticationPlugin', globals(),
__name__='manage_addERP5RemoteUserAuthenticationPluginForm')
def addERP5CertificateAuthorityAuthenticationPlugin(dispatcher, id, title=None, REQUEST=None):
""" Add a ERP5CertificateAuthorityAuthenticationPlugin to a Pluggable Auth Service. """
def addERP5RemoteUserAuthenticationPlugin(dispatcher, id, title=None, REQUEST=None):
""" Add a ERP5RemoteUserAuthenticationPlugin to a Pluggable Auth Service. """
plugin = ERP5CertificateAuthorityAuthenticationPlugin(id, title)
plugin = ERP5RemoteUserAuthenticationPlugin(id, title)
dispatcher._setObject(plugin.getId(), plugin)
if REQUEST is not None:
REQUEST['RESPONSE'].redirect(
'%s/manage_workspace'
'?manage_tabs_message='
'ERP5CertificateAuthorityAuthenticationPlugin+added.'
'ERP5RemoteUserAuthenticationPlugin+added.'
% dispatcher.absolute_url())
class ERP5CertificateAuthorityAuthenticationPlugin(ERP5UserManager):
class ERP5RemoteUserAuthenticationPlugin(ERP5UserManager):
"""
Plugin to authenicate as machines.
"""
......@@ -125,11 +125,11 @@ class ERP5CertificateAuthorityAuthenticationPlugin(ERP5UserManager):
return (login, login)
#List implementation of class
classImplements(ERP5CertificateAuthorityAuthenticationPlugin,
classImplements(ERP5RemoteUserAuthenticationPlugin,
plugins.IAuthenticationPlugin)
classImplements( ERP5CertificateAuthorityAuthenticationPlugin,
classImplements( ERP5RemoteUserAuthenticationPlugin,
plugins.ILoginPasswordHostExtractionPlugin
)
InitializeClass(ERP5CertificateAuthorityAuthenticationPlugin)
InitializeClass(ERP5RemoteUserAuthenticationPlugin)
......@@ -27,7 +27,7 @@ import ERP5RoleManager
import ERP5UserFactory
import ERP5KeyAuthPlugin
import ERP5ExternalAuthenticationPlugin
import ERP5CertificateAuthorityAuthenticationPlugin
import ERP5RemoteUserAuthenticationPlugin
def mergedLocalRoles(object):
"""Returns a merging of object and its ancestors'
......@@ -63,7 +63,7 @@ registerMultiPlugin(ERP5RoleManager.ERP5RoleManager.meta_type)
registerMultiPlugin(ERP5UserFactory.ERP5UserFactory.meta_type)
registerMultiPlugin(ERP5KeyAuthPlugin.ERP5KeyAuthPlugin.meta_type)
registerMultiPlugin(ERP5ExternalAuthenticationPlugin.ERP5ExternalAuthenticationPlugin.meta_type)
registerMultiPlugin(ERP5CertificateAuthorityAuthenticationPlugin.ERP5CertificateAuthorityAuthenticationPlugin.meta_type)
registerMultiPlugin(ERP5RemoteUserAuthenticationPlugin.ERP5RemoteUserAuthenticationPlugin.meta_type)
def initialize(context):
......@@ -121,11 +121,11 @@ def initialize(context):
, icon='www/portal.gif'
)
context.registerClass( ERP5CertificateAuthorityAuthenticationPlugin.ERP5CertificateAuthorityAuthenticationPlugin
context.registerClass( ERP5RemoteUserAuthenticationPlugin.ERP5RemoteUserAuthenticationPlugin
, permission=ManageUsers
, constructors=(
ERP5CertificateAuthorityAuthenticationPlugin.manage_addERP5CertificateAuthorityAuthenticationPluginForm,
ERP5CertificateAuthorityAuthenticationPlugin.addERP5CertificateAuthorityAuthenticationPlugin, )
ERP5RemoteUserAuthenticationPlugin.manage_addERP5RemoteUserAuthenticationPluginForm,
ERP5RemoteUserAuthenticationPlugin.addERP5RemoteUserAuthenticationPlugin, )
, visibility=None
, icon='www/portal.gif'
)
......
......@@ -409,19 +409,20 @@ class TestUserManagement(ERP5TypeTestCase):
self.tic()
self.assertEqual(None, person.getReference())
def testERP5CertificateAuthorityAuthenticationPlugin(self):
def testERP5RemoteUserAuthenticationPlugin(self):
"""
Make sure that we can grant security using a
ERP5 Certificate Authority Authentication Plugin.
"""
portal = self.portal
uf = portal.acl_users
plugin_id = 'erp5_remote_user_authentication_plugin'
uf.manage_addProduct['ERP5Security'].\
addERP5CertificateAuthorityAuthenticationPlugin(
id='erp5_certificate_authority_authentication_plugin',
title='ERP5 Certificate Authority Authentication Plugin',)
addERP5RemoteUserAuthenticationPlugin(
id=plugin_id,
title='ERP5 Remote User Authentication Plugin',)
plugin = getattr(uf, 'erp5_certificate_authority_authentication_plugin')
plugin = getattr(uf, plugin_id)
plugin.manage_activateInterfaces(interfaces=['IExtractionPlugin',
'IAuthenticationPlugin'])
self.stepTic()
......
......@@ -4,11 +4,11 @@
tal:replace="structure here/manage_form_title">Form Title</h2>
<p class="form-help">
ERP5 CertificateAuthority Authentication Plugin allows to login with remote
ERP5 RemoteUser Authentication Plugin allows to login with remote
user.
</p>
<form action="addERP5CertificateAuthorityAuthenticationPlugin" method="post">
<form action="addERP5RemoteUserAuthenticationPlugin" method="post">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment