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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
7e703204
Commit
7e703204
authored
Jun 07, 2022
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: also check PAS plugins which are not supposed to be activated
parent
17e4e0bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/CertificateAuthorityTool_checkSlapOSPASConsistency.py
...rp5/CertificateAuthorityTool_checkSlapOSPASConsistency.py
+15
-0
No files found.
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/CertificateAuthorityTool_checkSlapOSPASConsistency.py
View file @
7e703204
...
...
@@ -9,9 +9,12 @@ slapos_plugin_dict = {
'ERP5 Facebook Extraction Plugin'
],
'IGroupsPlugin'
:
[
'ZODB Group Manager'
,
'SlapOS Shadow Authentication Plugin'
,
'ERP5 Group Manager'
],
'IUserEnumerationPlugin'
:
[
'ZODB User Manager'
,
'SlapOS Shadow Authentication Plugin'
,
'ERP5 Login User Manager'
]
...
...
@@ -37,6 +40,18 @@ def mergePASDictDifference(portal, d, fixit):
error
+=
' Fixed.'
error_list
.
append
(
error
)
for
activated_plugin
in
meta_type_list
:
if
activated_plugin
not
in
active_list
:
error
=
'Plugin %s must not be activated %s.'
%
(
plugin
,
activated_plugin
)
if
fixit
:
existing
=
[
q
for
q
in
portal
.
acl_users
.
objectValues
()
if
q
.
meta_type
==
activated_plugin
]
if
len
(
existing
)
==
0
:
error_list
.
append
(
'%s not found'
%
activated_plugin
)
else
:
plugins
.
deactivatePlugin
(
plugin_info
[
'interface'
],
existing
[
0
].
getId
())
error
+=
' Fixed.'
error_list
.
append
(
error
)
return
error_list
pas_difference
=
mergePASDictDifference
(
portal
,
slapos_plugin_dict
,
fixit
)
...
...
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