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
Hardik Juneja
slapos.core
Commits
ba05d728
Commit
ba05d728
authored
Jan 09, 2013
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixup
83e731d9
.
Only shadow user is allowed to access public machine.
parent
9bb5accb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
master/bt5/slapos_rest_api/DocumentTemplateItem/portal_components/SlapOSRestAPIV1.py
...DocumentTemplateItem/portal_components/SlapOSRestAPIV1.py
+10
-6
master/bt5/slapos_rest_api/bt/revision
master/bt5/slapos_rest_api/bt/revision
+1
-1
No files found.
master/bt5/slapos_rest_api/DocumentTemplateItem/portal_components/SlapOSRestAPIV1.py
View file @
ba05d728
...
...
@@ -408,12 +408,16 @@ class InstancePublisher(GenericPublisher):
portal_type
=
"Person"
)
else
:
raise
NotImplementedError
,
"Can not get Person document"
result
=
user
.
Person_findPartition
(
self
.
jbody
[
'software_release'
],
self
.
jbody
[
'software_type'
],
(
'Software Instance'
,
'Slave Instance'
)[
int
(
self
.
jbody
[
'slave'
])],
self
.
jbody
[
'sla'
],
test_mode
=
True
)
result
=
user
.
Person_restrictMethodAsShadowUser
(
shadow_document
=
user
,
callable_object
=
user
.
Person_findPartition
,
argument_list
=
[
self
.
jbody
[
'software_release'
],
self
.
jbody
[
'software_type'
],
(
'Software Instance'
,
'Slave Instance'
)[
int
(
self
.
jbody
[
'slave'
])],
self
.
jbody
[
'sla'
]],
argument_dict
=
{
'test_mode'
:
True
})
except
Exception
:
transaction
.
abort
()
LOG
(
'SlapOSRestApiV1'
,
ERROR
,
...
...
master/bt5/slapos_rest_api/bt/revision
View file @
ba05d728
11
\ No newline at end of file
12
\ No newline at end of file
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