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