Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
c9d3c65d
Commit
c9d3c65d
authored
Aug 29, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename to Remote User plugin.
parent
9e030f0f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
23 deletions
+24
-23
product/ERP5Security/ERP5RemoteUserAuthenticationPlugin.py
product/ERP5Security/ERP5RemoteUserAuthenticationPlugin.py
+11
-11
product/ERP5Security/__init__.py
product/ERP5Security/__init__.py
+5
-5
product/ERP5Security/tests/testERP5Security.py
product/ERP5Security/tests/testERP5Security.py
+6
-5
product/ERP5Security/www/ERP5Security_addERP5RemoteUserAuthenticationPlugin.zpt
...ww/ERP5Security_addERP5RemoteUserAuthenticationPlugin.zpt
+2
-2
No files found.
product/ERP5Security/ERP5
CertificateAuthority
AuthenticationPlugin.py
→
product/ERP5Security/ERP5
RemoteUser
AuthenticationPlugin.py
View file @
c9d3c65d
...
...
@@ -52,25 +52,25 @@ from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery
#Form for new plugin in ZMI
manage_addERP5
CertificateAuthority
AuthenticationPluginForm
=
PageTemplateFile
(
'www/ERP5Security_addERP5
CertificateAuthority
AuthenticationPlugin'
,
globals
(),
__name__
=
'manage_addERP5
CertificateAuthority
AuthenticationPluginForm'
)
manage_addERP5
RemoteUser
AuthenticationPluginForm
=
PageTemplateFile
(
'www/ERP5Security_addERP5
RemoteUser
AuthenticationPlugin'
,
globals
(),
__name__
=
'manage_addERP5
RemoteUser
AuthenticationPluginForm'
)
def
addERP5
CertificateAuthority
AuthenticationPlugin
(
dispatcher
,
id
,
title
=
None
,
REQUEST
=
None
):
""" Add a ERP5
CertificateAuthority
AuthenticationPlugin to a Pluggable Auth Service. """
def
addERP5
RemoteUser
AuthenticationPlugin
(
dispatcher
,
id
,
title
=
None
,
REQUEST
=
None
):
""" Add a ERP5
RemoteUser
AuthenticationPlugin to a Pluggable Auth Service. """
plugin
=
ERP5
CertificateAuthority
AuthenticationPlugin
(
id
,
title
)
plugin
=
ERP5
RemoteUser
AuthenticationPlugin
(
id
,
title
)
dispatcher
.
_setObject
(
plugin
.
getId
(),
plugin
)
if
REQUEST
is
not
None
:
REQUEST
[
'RESPONSE'
].
redirect
(
'%s/manage_workspace'
'?manage_tabs_message='
'ERP5
CertificateAuthority
AuthenticationPlugin+added.'
'ERP5
RemoteUser
AuthenticationPlugin+added.'
%
dispatcher
.
absolute_url
())
class
ERP5
CertificateAuthority
AuthenticationPlugin
(
ERP5UserManager
):
class
ERP5
RemoteUser
AuthenticationPlugin
(
ERP5UserManager
):
"""
Plugin to authenicate as machines.
"""
...
...
@@ -125,11 +125,11 @@ class ERP5CertificateAuthorityAuthenticationPlugin(ERP5UserManager):
return
(
login
,
login
)
#List implementation of class
classImplements
(
ERP5
CertificateAuthority
AuthenticationPlugin
,
classImplements
(
ERP5
RemoteUser
AuthenticationPlugin
,
plugins
.
IAuthenticationPlugin
)
classImplements
(
ERP5
CertificateAuthority
AuthenticationPlugin
,
classImplements
(
ERP5
RemoteUser
AuthenticationPlugin
,
plugins
.
ILoginPasswordHostExtractionPlugin
)
InitializeClass
(
ERP5
CertificateAuthority
AuthenticationPlugin
)
InitializeClass
(
ERP5
RemoteUser
AuthenticationPlugin
)
product/ERP5Security/__init__.py
View file @
c9d3c65d
...
...
@@ -27,7 +27,7 @@ import ERP5RoleManager
import
ERP5UserFactory
import
ERP5KeyAuthPlugin
import
ERP5ExternalAuthenticationPlugin
import
ERP5
CertificateAuthority
AuthenticationPlugin
import
ERP5
RemoteUser
AuthenticationPlugin
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
(
ERP5
CertificateAuthorityAuthenticationPlugin
.
ERP5CertificateAuthority
AuthenticationPlugin
.
meta_type
)
registerMultiPlugin
(
ERP5
RemoteUserAuthenticationPlugin
.
ERP5RemoteUser
AuthenticationPlugin
.
meta_type
)
def
initialize
(
context
):
...
...
@@ -121,11 +121,11 @@ def initialize(context):
,
icon
=
'www/portal.gif'
)
context
.
registerClass
(
ERP5
CertificateAuthorityAuthenticationPlugin
.
ERP5CertificateAuthority
AuthenticationPlugin
context
.
registerClass
(
ERP5
RemoteUserAuthenticationPlugin
.
ERP5RemoteUser
AuthenticationPlugin
,
permission
=
ManageUsers
,
constructors
=
(
ERP5
CertificateAuthorityAuthenticationPlugin
.
manage_addERP5CertificateAuthority
AuthenticationPluginForm
,
ERP5
CertificateAuthorityAuthenticationPlugin
.
addERP5CertificateAuthority
AuthenticationPlugin
,
)
ERP5
RemoteUserAuthenticationPlugin
.
manage_addERP5RemoteUser
AuthenticationPluginForm
,
ERP5
RemoteUserAuthenticationPlugin
.
addERP5RemoteUser
AuthenticationPlugin
,
)
,
visibility
=
None
,
icon
=
'www/portal.gif'
)
...
...
product/ERP5Security/tests/testERP5Security.py
View file @
c9d3c65d
...
...
@@ -409,19 +409,20 @@ class TestUserManagement(ERP5TypeTestCase):
self
.
tic
()
self
.
assertEqual
(
None
,
person
.
getReference
())
def
testERP5
CertificateAuthority
AuthenticationPlugin
(
self
):
def
testERP5
RemoteUser
AuthenticationPlugin
(
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'
].
\
addERP5
CertificateAuthority
AuthenticationPlugin
(
id
=
'erp5_certificate_authority_authentication_plugin'
,
title
=
'ERP5
Certificate Authority
Authentication Plugin'
,)
addERP5
RemoteUser
AuthenticationPlugin
(
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
()
...
...
product/ERP5Security/www/ERP5Security_addERP5
CertificateAuthority
AuthenticationPlugin.zpt
→
product/ERP5Security/www/ERP5Security_addERP5
RemoteUser
AuthenticationPlugin.zpt
View file @
c9d3c65d
...
...
@@ -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="addERP5
CertificateAuthority
AuthenticationPlugin" method="post">
<form action="addERP5
RemoteUser
AuthenticationPlugin" method="post">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment