Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Titouan Soulard
slapos.core
Commits
aebb5950
Commit
aebb5950
authored
Oct 26, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rebrand Vifib Machine plugin to SlapOS namespace.
parent
d7f0a0b2
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
197 additions
and
65 deletions
+197
-65
master/bt5/slapos_cloud/PathTemplateItem/acl_users/slapos_machine.xml
...lapos_cloud/PathTemplateItem/acl_users/slapos_machine.xml
+20
-0
master/bt5/slapos_cloud/PathTemplateItem/portal_alarms/promise_slapos_pas.xml
...oud/PathTemplateItem/portal_alarms/promise_slapos_pas.xml
+4
-4
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_promise.xml
...os_cloud/SkinTemplateItem/portal_skins/slapos_promise.xml
+9
-5
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_promise/Alarm_checkPromiseSlapOSPAS.xml
...rtal_skins/slapos_promise/Alarm_checkPromiseSlapOSPAS.xml
+6
-9
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_promise/Alarm_checkPromiseSlapOSPASBase.xml
..._skins/slapos_promise/Alarm_checkPromiseSlapOSPASBase.xml
+113
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_promise/Alarm_fixWithActiveSense.xml
.../portal_skins/slapos_promise/Alarm_fixWithActiveSense.xml
+1
-1
master/bt5/slapos_cloud/bt/revision
master/bt5/slapos_cloud/bt/revision
+1
-1
master/bt5/slapos_cloud/bt/template_path_list
master/bt5/slapos_cloud/bt/template_path_list
+2
-0
master/bt5/slapos_cloud/bt/template_skin_id_list
master/bt5/slapos_cloud/bt/template_skin_id_list
+2
-1
master/bt5/vifib_data/bt/revision
master/bt5/vifib_data/bt/revision
+1
-1
master/bt5/vifib_data/bt/template_path_list
master/bt5/vifib_data/bt/template_path_list
+0
-1
master/bt5/vifib_erp5/bt/revision
master/bt5/vifib_erp5/bt/revision
+1
-1
master/bt5/vifib_slapos_rest_api_v1/DocumentTemplateItem/portal_components/VifibRestAPIV1.py
.../DocumentTemplateItem/portal_components/VifibRestAPIV1.py
+1
-1
master/bt5/vifib_slapos_rest_api_v1/bt/revision
master/bt5/vifib_slapos_rest_api_v1/bt/revision
+1
-1
master/product/SlapOS/SlapOSMachineAuthenticationPlugin.py
master/product/SlapOS/SlapOSMachineAuthenticationPlugin.py
+21
-24
master/product/SlapOS/__init__.py
master/product/SlapOS/__init__.py
+11
-1
master/product/SlapOS/www/SlapOS_addSlapOSMachineAuthenticationPlugin.zpt
...lapOS/www/SlapOS_addSlapOSMachineAuthenticationPlugin.zpt
+3
-3
master/product/Vifib/__init__.py
master/product/Vifib/__init__.py
+0
-11
No files found.
master/bt5/slapos_cloud/PathTemplateItem/acl_users/slapos_machine.xml
0 → 100644
View file @
aebb5950
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SlapOSMachineAuthenticationPlugin"
module=
"Products.SlapOS.SlapOSMachineAuthenticationPlugin"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_machine
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/
vifib_erp5/PathTemplateItem/portal_alarms/promise_vifib
_pas.xml
→
master/bt5/
slapos_cloud/PathTemplateItem/portal_alarms/promise_slapos
_pas.xml
View file @
aebb5950
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_checkPromise
Vifib
PAS
</string>
</value>
<value>
<string>
Alarm_checkPromise
SlapOS
PAS
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
alarm_notification_mode
</string>
</key>
<key>
<string>
alarm_notification_mode
</string>
</key>
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
promise_
vifib
_pas
</string>
</value>
<value>
<string>
promise_
slapos
_pas
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
periodicity_day_frequency
</string>
</key>
<key>
<string>
periodicity_day_frequency
</string>
</key>
...
@@ -93,11 +93,11 @@
...
@@ -93,11 +93,11 @@
</item>
</item>
<item>
<item>
<key>
<string>
solve_method_id
</string>
</key>
<key>
<string>
solve_method_id
</string>
</key>
<value>
<string>
Alarm_fix
PromiseVifibPAS
</string>
</value>
<value>
<string>
Alarm_fix
WithActiveSense
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string>
Pluggable Auth Service
Vifib
Promise
</string>
</value>
<value>
<string>
Pluggable Auth Service
SlapOS
Promise
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/
vifib_data/PathTemplateItem/acl_users/vifib_machine_authentication
.xml
→
master/bt5/
slapos_cloud/SkinTemplateItem/portal_skins/slapos_promise
.xml
View file @
aebb5950
...
@@ -2,19 +2,23 @@
...
@@ -2,19 +2,23 @@
<ZopeData>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<pickle>
<global
name=
"
VifibMachineAuthenticationPlugin"
module=
"Products.Vifib.VifibMachineAuthenticationPlugin
"
/>
<global
name=
"
Folder"
module=
"OFS.Folder
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
vifib_machine_authentication
</string>
</value>
<value>
<string>
slapos_promise
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<value>
<string></string>
</value>
<none/>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/
vifib_erp5/SkinTemplateItem/portal_skins/vifib_promise/Alarm_checkPromiseVifib
PAS.xml
→
master/bt5/
slapos_cloud/SkinTemplateItem/portal_skins/slapos_promise/Alarm_checkPromiseSlapOS
PAS.xml
View file @
aebb5950
...
@@ -52,25 +52,22 @@
...
@@ -52,25 +52,22 @@
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
promise_dict = {\n
<value>
<string>
promise_dict = {\n
\'IExtractionPlugin\': [\n
\'IExtractionPlugin\': [\n
\'
Vifib
Machine Authentication Plugin\',\n
\'
SlapOS
Machine Authentication Plugin\',\n
],\n
],\n
\'IAuthenticationPlugin\': [\n
\'IAuthenticationPlugin\': [\n
\'Vifib Machine Authentication Plugin\',\n
\'SlapOS Machine Authentication Plugin\',\n
\'Vifib Shadow Authentication Plugin\',\n
\'SlapOS Shadow Authentication Plugin\',\n
\'SlapOS Shadow Authentication Plugin\',\n
],\n
],\n
\'IGroupsPlugin\': [\n
\'IGroupsPlugin\': [\n
\'Vifib Machine Authentication Plugin\',\n
\'SlapOS Machine Authentication Plugin\',\n
\'Vifib Shadow Authentication Plugin\',\n
\'SlapOS Shadow Authentication Plugin\',\n
\'SlapOS Shadow Authentication Plugin\',\n
],\n
],\n
\'IUserEnumerationPlugin\': [\n
\'IUserEnumerationPlugin\': [\n
\'Vifib Machine Authentication Plugin\',\n
\'SlapOS Machine Authentication Plugin\',\n
\'Vifib Shadow Authentication Plugin\',\n
\'SlapOS Shadow Authentication Plugin\',\n
\'SlapOS Shadow Authentication Plugin\',\n
]\n
]\n
}\n
}\n
context.Alarm_checkPromise
Vifib
PASBase(promise_dict, tag, fixit=fixit, **kw)\n
context.Alarm_checkPromise
SlapOS
PASBase(promise_dict, tag, fixit=fixit, **kw)\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
@@ -79,7 +76,7 @@ context.Alarm_checkPromiseVifibPASBase(promise_dict, tag, fixit=fixit, **kw)\n
...
@@ -79,7 +76,7 @@ context.Alarm_checkPromiseVifibPASBase(promise_dict, tag, fixit=fixit, **kw)\n
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_checkPromise
Vifib
PAS
</string>
</value>
<value>
<string>
Alarm_checkPromise
SlapOS
PAS
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_promise/Alarm_checkPromiseSlapOSPASBase.xml
0 → 100644
View file @
aebb5950
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
from Products.CMFActivity.ActiveResult import ActiveResult\n
\n
portal = context.getPortalObject()\n
def mergePASDictDifference(portal, d, fixit):\n
plugins = portal.acl_users.plugins\n
error_list = []\n
plugin_type_info = plugins.listPluginTypeInfo()\n
for plugin, active_list in d.iteritems():\n
plugin_info = [q for q in plugin_type_info if q[\'id\'] == plugin][0]\n
found_list = plugins.listPlugins(plugin_info[\'interface\'])\n
meta_type_list = [q[1].meta_type for q in found_list]\n
for expected in active_list:\n
if expected not in meta_type_list:\n
error = \'Plugin %s missing %s.\' % (plugin, expected)\n
if fixit: \n
existing = [q for q in portal.acl_users.objectValues() if q.meta_type == expected]\n
if len(existing) == 0:\n
error_list.append(\'%s not found\' % expected)\n
else:\n
plugins.activatePlugin(plugin_info[\'interface\'], existing[0].getId())\n
error += \' Fixed.\'\n
error_list.append(error)\n
\n
return error_list\n
\n
pas_difference = mergePASDictDifference(portal, promise_dict, fixit)\n
if len(pas_difference) != 0:\n
if fixit:\n
severity = 0\n
else:\n
severity = 1\n
summary = "PAS not configured as expected"\n
if fixit:\n
summary += \' (fixed)\'\n
detail = "Difference:\\n%s" % (\'\\n\'.join(pas_difference), )\n
else:\n
severity = 0\n
summary = "Nothing to do."\n
detail = ""\n
\n
active_result = ActiveResult()\n
active_result.edit(\n
summary=summary, \n
severity=severity,\n
detail=detail)\n
\n
context.newActiveProcess().postResult(active_result)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
promise_dict, tag, fixit=False, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_checkPromiseSlapOSPASBase
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/
vifib_erp5/SkinTemplateItem/portal_skins/vifib_promise/Alarm_fixPromiseVifibPAS
.xml
→
master/bt5/
slapos_cloud/SkinTemplateItem/portal_skins/slapos_promise/Alarm_fixWithActiveSense
.xml
View file @
aebb5950
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_fix
PromiseVifibPAS
</string>
</value>
<value>
<string>
Alarm_fix
WithActiveSense
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/slapos_cloud/bt/revision
View file @
aebb5950
115
116
\ No newline at end of file
\ No newline at end of file
master/bt5/slapos_cloud/bt/template_path_list
View file @
aebb5950
acl_users/slapos_machine
acl_users/slapos_shadow
acl_users/slapos_shadow
computer_module/template_computer
computer_module/template_computer
computer_module/template_computer/**
computer_module/template_computer/**
hosting_subscription_module/template_hosting_subscription
hosting_subscription_module/template_hosting_subscription
person_module/template_member
person_module/template_member
person_module/template_member/**
person_module/template_member/**
portal_alarms/promise_slapos_pas
portal_alarms/slapos_allocate_instance
portal_alarms/slapos_allocate_instance
software_installation_module/template_software_installation
software_installation_module/template_software_installation
software_instance_module/template_software_instance
software_instance_module/template_software_instance
\ No newline at end of file
master/bt5/slapos_cloud/bt/template_skin_id_list
View file @
aebb5950
slapos_cloud
slapos_cloud
slapos_promise
\ No newline at end of file
master/bt5/vifib_data/bt/revision
View file @
aebb5950
109
110
\ No newline at end of file
\ No newline at end of file
master/bt5/vifib_data/bt/template_path_list
View file @
aebb5950
...
@@ -3,7 +3,6 @@ acl_users/erp5_google_extraction
...
@@ -3,7 +3,6 @@ acl_users/erp5_google_extraction
acl_users/vifib_browser_id_authentication
acl_users/vifib_browser_id_authentication
acl_users/vifib_facebook_authentication
acl_users/vifib_facebook_authentication
acl_users/vifib_google_authentication
acl_users/vifib_google_authentication
acl_users/vifib_machine_authentication
currency_module/EUR
currency_module/EUR
document_module/1
document_module/1
notification_message_module/vifib_hosting_hosting_request
notification_message_module/vifib_hosting_hosting_request
...
...
master/bt5/vifib_erp5/bt/revision
View file @
aebb5950
527
528
\ No newline at end of file
\ No newline at end of file
master/bt5/vifib_slapos_rest_api_v1/DocumentTemplateItem/portal_components/VifibRestAPIV1.py
View file @
aebb5950
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
from
Acquisition
import
Implicit
from
Acquisition
import
Implicit
from
AccessControl
import
ClassSecurityInfo
,
getSecurityManager
,
Unauthorized
from
AccessControl
import
ClassSecurityInfo
,
getSecurityManager
,
Unauthorized
from
Products.
Vifib.Vifib
MachineAuthenticationPlugin
import
getUserByLogin
from
Products.
SlapOS.SlapOS
MachineAuthenticationPlugin
import
getUserByLogin
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
ComputedAttribute
import
ComputedAttribute
from
ComputedAttribute
import
ComputedAttribute
from
zLOG
import
LOG
,
ERROR
from
zLOG
import
LOG
,
ERROR
...
...
master/bt5/vifib_slapos_rest_api_v1/bt/revision
View file @
aebb5950
23
24
\ No newline at end of file
\ No newline at end of file
master/product/
Vifib/Vifib
MachineAuthenticationPlugin.py
→
master/product/
SlapOS/SlapOS
MachineAuthenticationPlugin.py
View file @
aebb5950
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
# programmers who take the whole responsibility of assessing all potential
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly advi
c
ed to contract a Free Software
# guarantees and support are strongly advi
s
ed to contract a Free Software
# Service Company
# Service Company
#
#
# This program is Free Software; you can redistribute it and/or
# This program is Free Software; you can redistribute it and/or
...
@@ -51,21 +51,21 @@ from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery
...
@@ -51,21 +51,21 @@ from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery
from
Products.ERP5Security.ERP5UserManager
import
getValidAssignmentList
from
Products.ERP5Security.ERP5UserManager
import
getValidAssignmentList
#Form for new plugin in ZMI
#Form for new plugin in ZMI
manage_add
Vifib
MachineAuthenticationPluginForm
=
PageTemplateFile
(
manage_add
SlapOS
MachineAuthenticationPluginForm
=
PageTemplateFile
(
'www/
Vifib_addVifib
MachineAuthenticationPlugin'
,
globals
(),
'www/
SlapOS_addSlapOS
MachineAuthenticationPlugin'
,
globals
(),
__name__
=
'manage_add
Vifib
MachineAuthenticationPluginForm'
)
__name__
=
'manage_add
SlapOS
MachineAuthenticationPluginForm'
)
def
add
Vifib
MachineAuthenticationPlugin
(
dispatcher
,
id
,
title
=
None
,
REQUEST
=
None
):
def
add
SlapOS
MachineAuthenticationPlugin
(
dispatcher
,
id
,
title
=
None
,
REQUEST
=
None
):
""" Add a
Vifib
MachineAuthenticationPlugin to a Pluggable Auth Service. """
""" Add a
SlapOS
MachineAuthenticationPlugin to a Pluggable Auth Service. """
plugin
=
Vifib
MachineAuthenticationPlugin
(
id
,
title
)
plugin
=
SlapOS
MachineAuthenticationPlugin
(
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='
'
Vifib
MachineAuthenticationPlugin+added.'
'
SlapOS
MachineAuthenticationPlugin+added.'
%
dispatcher
.
absolute_url
())
%
dispatcher
.
absolute_url
())
@
transactional_cached
(
lambda
portal
,
*
args
:
args
)
@
transactional_cached
(
lambda
portal
,
*
args
:
args
)
...
@@ -101,12 +101,12 @@ def getUserByLogin(portal, login):
...
@@ -101,12 +101,12 @@ def getUserByLogin(portal, login):
# by default (feature).
# by default (feature).
return
[
x
.
getObject
()
for
x
in
result
if
x
[
'reference'
]
in
login
]
return
[
x
.
getObject
()
for
x
in
result
if
x
[
'reference'
]
in
login
]
class
Vifib
MachineAuthenticationPlugin
(
BasePlugin
):
class
SlapOS
MachineAuthenticationPlugin
(
BasePlugin
):
"""
"""
Plugin to authenicate as machines.
Plugin to authenicate as machines.
"""
"""
meta_type
=
"
Vifib
Machine Authentication Plugin"
meta_type
=
"
SlapOS
Machine Authentication Plugin"
security
=
ClassSecurityInfo
()
security
=
ClassSecurityInfo
()
def
__init__
(
self
,
id
,
title
=
None
):
def
__init__
(
self
,
id
,
title
=
None
):
...
@@ -174,7 +174,7 @@ class VifibMachineAuthenticationPlugin(BasePlugin):
...
@@ -174,7 +174,7 @@ class VifibMachineAuthenticationPlugin(BasePlugin):
except
ConflictError
:
except
ConflictError
:
raise
raise
except
:
except
:
LOG
(
'
Vifib
MachineAuthenticationPlugin'
,
PROBLEM
,
'getUserByLogin failed'
,
LOG
(
'
SlapOS
MachineAuthenticationPlugin'
,
PROBLEM
,
'getUserByLogin failed'
,
error
=
sys
.
exc_info
())
error
=
sys
.
exc_info
())
# Here we must raise an exception to prevent callers from caching
# Here we must raise an exception to prevent callers from caching
# a result of a degraded situation.
# a result of a degraded situation.
...
@@ -346,17 +346,14 @@ class VifibMachineAuthenticationPlugin(BasePlugin):
...
@@ -346,17 +346,14 @@ class VifibMachineAuthenticationPlugin(BasePlugin):
return
tuple
(
user_info
)
return
tuple
(
user_info
)
#List implementation of class
#List implementation of class
classImplements
(
Vifib
MachineAuthenticationPlugin
,
classImplements
(
SlapOS
MachineAuthenticationPlugin
,
plugins
.
IAuthenticationPlugin
)
plugins
.
IAuthenticationPlugin
)
classImplements
(
VifibMachineAuthenticationPlugin
,
classImplements
(
SlapOSMachineAuthenticationPlugin
,
plugins
.
ILoginPasswordHostExtractionPlugin
plugins
.
ILoginPasswordHostExtractionPlugin
)
)
classImplements
(
SlapOSMachineAuthenticationPlugin
,
classImplements
(
VifibMachineAuthenticationPlugin
,
plugins
.
IGroupsPlugin
)
plugins
.
IGroupsPlugin
classImplements
(
SlapOSMachineAuthenticationPlugin
,
)
plugins
.
IUserEnumerationPlugin
)
classImplements
(
VifibMachineAuthenticationPlugin
,
plugins
.
IUserEnumerationPlugin
)
InitializeClass
(
Vifib
MachineAuthenticationPlugin
)
InitializeClass
(
SlapOS
MachineAuthenticationPlugin
)
master/product/SlapOS/__init__.py
View file @
aebb5950
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
##############################################################################
#
#
# Copyright (c) 2012
Vifib
SA and Contributors. All Rights Reserved.
# Copyright (c) 2012
Nexedi
SA and Contributors. All Rights Reserved.
#
#
# WARNING: This program as such is intended to be used by professional
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# programmers who take the whole responsibility of assessing all potential
...
@@ -38,6 +38,7 @@ content_constructors = ()
...
@@ -38,6 +38,7 @@ content_constructors = ()
portal_tools
=
()
portal_tools
=
()
from
Products.PluggableAuthService.PluggableAuthService
import
registerMultiPlugin
from
Products.PluggableAuthService.PluggableAuthService
import
registerMultiPlugin
import
SlapOSMachineAuthenticationPlugin
import
SlapOSShadowAuthenticationPlugin
import
SlapOSShadowAuthenticationPlugin
def
initialize
(
context
):
def
initialize
(
context
):
...
@@ -47,6 +48,14 @@ def initialize(context):
...
@@ -47,6 +48,14 @@ def initialize(context):
portal_tools
=
portal_tools
,
content_constructors
=
content_constructors
,
portal_tools
=
portal_tools
,
content_constructors
=
content_constructors
,
content_classes
=
content_classes
)
content_classes
=
content_classes
)
context
.
registerClass
(
SlapOSMachineAuthenticationPlugin
.
SlapOSMachineAuthenticationPlugin
,
permission
=
ManageUsers
,
constructors
=
(
SlapOSMachineAuthenticationPlugin
.
manage_addSlapOSMachineAuthenticationPluginForm
,
SlapOSMachineAuthenticationPlugin
.
addSlapOSMachineAuthenticationPlugin
,
)
,
visibility
=
None
,
icon
=
'www/portal.gif'
)
context
.
registerClass
(
SlapOSShadowAuthenticationPlugin
.
SlapOSShadowAuthenticationPlugin
context
.
registerClass
(
SlapOSShadowAuthenticationPlugin
.
SlapOSShadowAuthenticationPlugin
,
permission
=
ManageUsers
,
permission
=
ManageUsers
,
constructors
=
(
,
constructors
=
(
...
@@ -57,4 +66,5 @@ def initialize(context):
...
@@ -57,4 +66,5 @@ def initialize(context):
)
)
registerMultiPlugin
(
SlapOSMachineAuthenticationPlugin
.
SlapOSMachineAuthenticationPlugin
.
meta_type
)
registerMultiPlugin
(
SlapOSShadowAuthenticationPlugin
.
SlapOSShadowAuthenticationPlugin
.
meta_type
)
registerMultiPlugin
(
SlapOSShadowAuthenticationPlugin
.
SlapOSShadowAuthenticationPlugin
.
meta_type
)
master/product/
Vifib/www/Vifib_addVifib
MachineAuthenticationPlugin.zpt
→
master/product/
SlapOS/www/SlapOS_addSlapOS
MachineAuthenticationPlugin.zpt
View file @
aebb5950
<h1 tal:replace="structure here/manage_page_header">Header</h1>
<h1 tal:replace="structure here/manage_page_header">Header</h1>
<h2 tal:define="form_title string:Add
Vifib
Machine Authentication Plugin"
<h2 tal:define="form_title string:Add
SlapOS
Machine Authentication Plugin"
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">
Vifib
Machine Authentication Plugin allows to login machines (Computers and
SlapOS
Machine Authentication Plugin allows to login machines (Computers and
Software Instances)
Software Instances)
</p>
</p>
<form action="add
Vifib
MachineAuthenticationPlugin" method="post">
<form action="add
SlapOS
MachineAuthenticationPlugin" 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">
...
...
master/product/Vifib/__init__.py
View file @
aebb5950
...
@@ -41,7 +41,6 @@ from Tool import SlapTool, VifibRestApiTool
...
@@ -41,7 +41,6 @@ from Tool import SlapTool, VifibRestApiTool
portal_tools
=
(
SlapTool
.
SlapTool
,
VifibRestApiTool
.
VifibRestApiTool
)
portal_tools
=
(
SlapTool
.
SlapTool
,
VifibRestApiTool
.
VifibRestApiTool
)
from
Products.PluggableAuthService.PluggableAuthService
import
registerMultiPlugin
from
Products.PluggableAuthService.PluggableAuthService
import
registerMultiPlugin
import
VifibMachineAuthenticationPlugin
import
VifibCookieHashExtractionPlugin
import
VifibCookieHashExtractionPlugin
def
initialize
(
context
):
def
initialize
(
context
):
...
@@ -51,15 +50,6 @@ def initialize(context):
...
@@ -51,15 +50,6 @@ def initialize(context):
portal_tools
=
portal_tools
,
content_constructors
=
content_constructors
,
portal_tools
=
portal_tools
,
content_constructors
=
content_constructors
,
content_classes
=
content_classes
)
content_classes
=
content_classes
)
context
.
registerClass
(
VifibMachineAuthenticationPlugin
.
VifibMachineAuthenticationPlugin
,
permission
=
ManageUsers
,
constructors
=
(
VifibMachineAuthenticationPlugin
.
manage_addVifibMachineAuthenticationPluginForm
,
VifibMachineAuthenticationPlugin
.
addVifibMachineAuthenticationPlugin
,
)
,
visibility
=
None
,
icon
=
'www/portal.gif'
)
context
.
registerClass
(
VifibCookieHashExtractionPlugin
.
VifibFacebookServerExtractionPlugin
context
.
registerClass
(
VifibCookieHashExtractionPlugin
.
VifibFacebookServerExtractionPlugin
,
permission
=
ManageUsers
,
permission
=
ManageUsers
,
constructors
=
(
,
constructors
=
(
...
@@ -88,7 +78,6 @@ def initialize(context):
...
@@ -88,7 +78,6 @@ def initialize(context):
)
)
registerMultiPlugin
(
VifibMachineAuthenticationPlugin
.
VifibMachineAuthenticationPlugin
.
meta_type
)
registerMultiPlugin
(
VifibCookieHashExtractionPlugin
.
VifibFacebookServerExtractionPlugin
.
meta_type
)
registerMultiPlugin
(
VifibCookieHashExtractionPlugin
.
VifibFacebookServerExtractionPlugin
.
meta_type
)
registerMultiPlugin
(
VifibCookieHashExtractionPlugin
.
VifibGoogleServerExtractionPlugin
.
meta_type
)
registerMultiPlugin
(
VifibCookieHashExtractionPlugin
.
VifibGoogleServerExtractionPlugin
.
meta_type
)
registerMultiPlugin
(
VifibCookieHashExtractionPlugin
.
VifibBrowserIDExtractionPlugin
.
meta_type
)
registerMultiPlugin
(
VifibCookieHashExtractionPlugin
.
VifibBrowserIDExtractionPlugin
.
meta_type
)
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