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
Léo-Paul Géneau
slapos.core
Commits
3ba9c9cf
Commit
3ba9c9cf
authored
Aug 01, 2017
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: Import SUPER_USER from the right location
Follow up changes from ERP5Security.
parent
72b56997
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
master/bt5/slapos_cloud/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSCloud.py
...plateItem/portal_components/extension.erp5.SlapOSCloud.py
+3
-2
No files found.
master/bt5/slapos_cloud/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSCloud.py
View file @
3ba9c9cf
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
from
AccessControl.SecurityManagement
import
getSecurityManager
,
\
from
AccessControl.SecurityManagement
import
getSecurityManager
,
\
setSecurityManager
,
newSecurityManager
setSecurityManager
,
newSecurityManager
from
Products
.ERP5Security.ERP5UserManager
import
SUPER_USER
from
Products
import
ERP5Security
def
SoftwareInstance_bangAsSelf
(
self
,
relative_url
=
None
,
reference
=
None
,
def
SoftwareInstance_bangAsSelf
(
self
,
relative_url
=
None
,
reference
=
None
,
comment
=
None
):
comment
=
None
):
...
@@ -43,7 +43,8 @@ def SoftwareInstance_bangAsSelf(self, relative_url=None, reference=None,
...
@@ -43,7 +43,8 @@ def SoftwareInstance_bangAsSelf(self, relative_url=None, reference=None,
if
(
software_instance
.
getPortalType
()
==
"Slave Instance"
)
and
\
if
(
software_instance
.
getPortalType
()
==
"Slave Instance"
)
and
\
(
software_instance
.
getReference
()
==
reference
):
(
software_instance
.
getReference
()
==
reference
):
# XXX There is no account for Slave Instance
# XXX There is no account for Slave Instance
reference
=
SUPER_USER
reference
=
ERP5Security
.
SUPER_USER
newSecurityManager
(
None
,
self
.
getPortalObject
().
acl_users
.
getUserById
(
newSecurityManager
(
None
,
self
.
getPortalObject
().
acl_users
.
getUserById
(
reference
))
reference
))
try
:
try
:
...
...
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