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
Thomas Gambier
slapos.core
Commits
f65752c5
Commit
f65752c5
authored
Apr 25, 2016
by
Alain Takoudjou
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
Hide 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
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
'field_your_instance_xml'
in
request
:
if
context
.
getTextContent
()
!=
request
[
'field_your_instance_xml'
]:
if
context
.
getTextContent
()
!=
request
[
'field_your_instance_xml'
]:
context
.
HostingSubscription_requestPerson
(
instance_xml
=
request
[
'field_your_instance_xml'
])
context
.
HostingSubscription_requestPerson
(
instance_xml
=
request
[
'field_your_instance_xml'
])
...
...
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