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
Paul Graydon
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
...
@@ -52,25 +52,25 @@ from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery
#Form for new plugin in ZMI
#Form for new plugin in ZMI
manage_addERP5
CertificateAuthority
AuthenticationPluginForm
=
PageTemplateFile
(
manage_addERP5
RemoteUser
AuthenticationPluginForm
=
PageTemplateFile
(
'www/ERP5Security_addERP5
CertificateAuthority
AuthenticationPlugin'
,
globals
(),
'www/ERP5Security_addERP5
RemoteUser
AuthenticationPlugin'
,
globals
(),
__name__
=
'manage_addERP5
CertificateAuthority
AuthenticationPluginForm'
)
__name__
=
'manage_addERP5
RemoteUser
AuthenticationPluginForm'
)
def
addERP5
CertificateAuthority
AuthenticationPlugin
(
dispatcher
,
id
,
title
=
None
,
REQUEST
=
None
):
def
addERP5
RemoteUser
AuthenticationPlugin
(
dispatcher
,
id
,
title
=
None
,
REQUEST
=
None
):
""" Add a ERP5
CertificateAuthority
AuthenticationPlugin to a Pluggable Auth Service. """
""" 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
)
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='
'ERP5
CertificateAuthority
AuthenticationPlugin+added.'
'ERP5
RemoteUser
AuthenticationPlugin+added.'
%
dispatcher
.
absolute_url
())
%
dispatcher
.
absolute_url
())
class
ERP5
CertificateAuthority
AuthenticationPlugin
(
ERP5UserManager
):
class
ERP5
RemoteUser
AuthenticationPlugin
(
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
(
ERP5
CertificateAuthority
AuthenticationPlugin
,
classImplements
(
ERP5
RemoteUser
AuthenticationPlugin
,
plugins
.
IAuthenticationPlugin
)
plugins
.
IAuthenticationPlugin
)
classImplements
(
ERP5
CertificateAuthority
AuthenticationPlugin
,
classImplements
(
ERP5
RemoteUser
AuthenticationPlugin
,
plugins
.
ILoginPasswordHostExtractionPlugin
plugins
.
ILoginPasswordHostExtractionPlugin
)
)
InitializeClass
(
ERP5
CertificateAuthority
AuthenticationPlugin
)
InitializeClass
(
ERP5
RemoteUser
AuthenticationPlugin
)
product/ERP5Security/__init__.py
View file @
c9d3c65d
...
@@ -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
ERP5
CertificateAuthority
AuthenticationPlugin
import
ERP5
RemoteUser
AuthenticationPlugin
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
(
ERP5
CertificateAuthorityAuthenticationPlugin
.
ERP5CertificateAuthority
AuthenticationPlugin
.
meta_type
)
registerMultiPlugin
(
ERP5
RemoteUserAuthenticationPlugin
.
ERP5RemoteUser
AuthenticationPlugin
.
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
(
ERP5
CertificateAuthorityAuthenticationPlugin
.
ERP5CertificateAuthority
AuthenticationPlugin
context
.
registerClass
(
ERP5
RemoteUserAuthenticationPlugin
.
ERP5RemoteUser
AuthenticationPlugin
,
permission
=
ManageUsers
,
permission
=
ManageUsers
,
constructors
=
(
,
constructors
=
(
ERP5
CertificateAuthorityAuthenticationPlugin
.
manage_addERP5CertificateAuthority
AuthenticationPluginForm
,
ERP5
RemoteUserAuthenticationPlugin
.
manage_addERP5RemoteUser
AuthenticationPluginForm
,
ERP5
CertificateAuthorityAuthenticationPlugin
.
addERP5CertificateAuthority
AuthenticationPlugin
,
)
ERP5
RemoteUserAuthenticationPlugin
.
addERP5RemoteUser
AuthenticationPlugin
,
)
,
visibility
=
None
,
visibility
=
None
,
icon
=
'www/portal.gif'
,
icon
=
'www/portal.gif'
)
)
...
...
product/ERP5Security/tests/testERP5Security.py
View file @
c9d3c65d
...
@@ -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
testERP5
CertificateAuthority
AuthenticationPlugin
(
self
):
def
testERP5
RemoteUser
AuthenticationPlugin
(
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'
].
\
addERP5
CertificateAuthority
AuthenticationPlugin
(
addERP5
RemoteUser
AuthenticationPlugin
(
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
()
...
...
product/ERP5Security/www/ERP5Security_addERP5
CertificateAuthority
AuthenticationPlugin.zpt
→
product/ERP5Security/www/ERP5Security_addERP5
RemoteUser
AuthenticationPlugin.zpt
View file @
c9d3c65d
...
@@ -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="addERP5
CertificateAuthority
AuthenticationPlugin" method="post">
<form action="addERP5
RemoteUser
AuthenticationPlugin" 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">
...
...
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