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
23
Merge Requests
23
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
4c0ac840
Commit
4c0ac840
authored
Mar 09, 2018
by
Rafael Monnerat
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Patch ERP5Site_activeLogin to be compliant with renderjs
parent
edadcb6c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
136 additions
and
10 deletions
+136
-10
master/bt5/slapos_jio/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSHypermedia.py
...Item/portal_components/extension.erp5.SlapOSHypermedia.py
+11
-7
master/bt5/slapos_jio/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSHypermedia.xml
...tem/portal_components/extension.erp5.SlapOSHypermedia.xml
+30
-3
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ERP5Site_activeLogin.py
...ortal_skins/slapos_hal_json_style/ERP5Site_activeLogin.py
+25
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ERP5Site_activeLogin.xml
...rtal_skins/slapos_hal_json_style/ERP5Site_activeLogin.xml
+70
-0
No files found.
master/bt5/slapos_jio/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSHypermedia.py
View file @
4c0ac840
...
...
@@ -25,11 +25,15 @@
#
##############################################################################
from
Products.SlapOS.SlapOSMachineAuthenticationPlugin
import
getUserByLogin
from
zExceptions
import
Unauthorized
def
getUserDocument
(
self
,
username
):
portal
=
self
.
getPortalObject
()
user_document
=
getUserByLogin
(
portal
,
str
(
username
))
if
len
(
user_document
)
!=
1
:
return
return
user_document
[
0
]
def
unrestrictedSearchMessage
(
self
,
key
,
REQUEST
=
None
):
if
REQUEST
is
not
None
:
raise
Unauthorized
message
=
self
.
getPortalObject
().
portal_catalog
.
unrestrictedSearchResults
(
portal_type
=
"Mail Message"
,
reference
=
key
,
limit
=
1
)
if
len
(
message
):
return
message
[
0
].
getObject
()
return
\ No newline at end of file
master/bt5/slapos_jio/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSHypermedia.xml
View file @
4c0ac840
...
...
@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SlapOSHypermedia
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
extension.erp5.SlapOSHypermedia
</string>
</value>
...
...
@@ -43,13 +55,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -62,7 +89,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -71,7 +98,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ERP5Site_activeLogin.py
0 → 100644
View file @
4c0ac840
from
Products.ERP5Type.Message
import
translateString
from
ZTUtils
import
make_query
portal
=
context
.
getPortalObject
()
assert
key
mail_message
=
portal
.
ERP5Site_unrestrictedSearchMessage
(
key
=
key
)
came_from
=
portal
.
absolute_url
()
+
"/#!login?p.page=slapos{&n.me}"
credential_request
=
mail_message
.
getFollowUpValue
()
if
credential_request
.
getValidationState
()
in
(
'submitted'
,
'accepted'
):
message
=
translateString
(
"Your account is already active."
)
else
:
credential_request
.
submit
(
comment
=
translateString
(
'Created by subscription form'
))
mail_message
.
deliver
()
message
=
translateString
(
"Your account is being activated. You will receive an e-mail when activation is complete."
)
url
=
"%s/login_form?portal_status_message=%s&%s"
%
(
context
.
getWebSectionValue
().
absolute_url
(),
message
,
make_query
({
"came_from"
:
came_from
})
)
context
.
REQUEST
.
RESPONSE
.
setHeader
(
'Location'
,
url
)
context
.
REQUEST
.
RESPONSE
.
setStatus
(
303
)
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ERP5Site_activeLogin.xml
0 → 100644
View file @
4c0ac840
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
key
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_activeLogin
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Thomas Gambier
🚴🏼
@tomo
mentioned in commit
23cbe832
·
Apr 25, 2022
mentioned in commit
23cbe832
mentioned in commit 23cbe832e385034d92f210149827cbc7ff3fe2a6
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