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
Labels
Merge Requests
21
Merge Requests
21
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
f65752c5
Commit
f65752c5
authored
Apr 25, 2016
by
Alain Takoudjou
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_web: prevent user to try to change software_type of requested hosting subscription
parent
bf2d0b49
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/HostingSubscription_editWebMode.py
...al_skins/vifib_hosting/HostingSubscription_editWebMode.py
+12
-0
No files found.
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/HostingSubscription_editWebMode.py
View file @
f65752c5
request
=
context
.
REQUEST
def
isSoftwareTypeChanged
(
software_type
):
base_type
=
[
'RootSoftwareInstance'
,
'default'
]
current_software_type
=
context
.
getSourceReference
()
if
software_type
in
base_type
and
current_software_type
in
base_type
:
return
False
else
:
return
current_software_type
!=
software_type
if
'software_type'
in
request
and
isSoftwareTypeChanged
(
request
[
'software_type'
]):
message
=
"Sorry, you cannot change 'Software Type' value."
return
context
.
Base_redirect
(
'view'
,
keep_items
=
{
'portal_status_message'
:
context
.
Base_translateString
(
message
)})
if
'field_your_instance_xml'
in
request
:
if
context
.
getTextContent
()
!=
request
[
'field_your_instance_xml'
]:
context
.
HostingSubscription_requestPerson
(
instance_xml
=
request
[
'field_your_instance_xml'
])
...
...
Rafael Monnerat
@rafael
mentioned in commit
2a2c34a7
·
Apr 28, 2016
mentioned in commit
2a2c34a7
mentioned in commit 2a2c34a7cc298089e05bbb97e210db9cd1aa4efe
Toggle commit list
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