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
fe64bea0
Commit
fe64bea0
authored
Feb 15, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: Require that email is always provided
parent
0f638a62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
master/bt5/slapos_subscription_request/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSSubscriptionRequest.py
...al_components/extension.erp5.SlapOSSubscriptionRequest.py
+3
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.py
...est/SubscriptionRequestModule_requestSubscriptionProxy.py
+16
-0
No files found.
master/bt5/slapos_subscription_request/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSSubscriptionRequest.py
View file @
fe64bea0
...
@@ -44,6 +44,9 @@ def SubscriptionRequest_searchExistingUserByEmail(self, email, REQUEST=None):
...
@@ -44,6 +44,9 @@ def SubscriptionRequest_searchExistingUserByEmail(self, email, REQUEST=None):
raise
Unauthorized
raise
Unauthorized
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
if
email
in
[
""
,
None
]:
return
erp5_login_list
=
portal
.
portal_catalog
.
unrestrictedSearchResults
(
erp5_login_list
=
portal
.
portal_catalog
.
unrestrictedSearchResults
(
portal_type
=
"ERP5 Login"
,
portal_type
=
"ERP5 Login"
,
reference
=
email
,
reference
=
email
,
...
...
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.py
View file @
fe64bea0
...
@@ -6,6 +6,22 @@ if REQUEST is not None:
...
@@ -6,6 +6,22 @@ if REQUEST is not None:
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
web_site
=
context
.
getWebSiteValue
()
web_site
=
context
.
getWebSiteValue
()
if
email
in
[
""
,
None
]:
error
=
"Email must be provided"
base_url
=
context
.
getWebSectionValue
().
absolute_url
()
redirect_url
=
"%s?field_your_reservation_name=%s&field_your_reservation_email=%s&field_your_reservation_number_of_machines=%s&field_your_reservation_network=%s&field_your_reservation_invitation_token=%s&portal_status_message=%s"
%
(
base_url
,
user_input_dict
[
'name'
],
email
,
user_input_dict
[
"amount"
],
subscription_reference
,
token
,
error
)
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
redirect_url
)
if
token
:
if
token
:
error
=
""
error
=
""
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