Commit 99206e2d authored by Ivan Tyagov's avatar Ivan Tyagov

erp5_wendelin_data_lake_ui: use Base_getUserCaption script to get logged in user

See merge request !65
parents 43e5b9bf 798aec02
portal = context.getPortalObject()
user_reference = portal.Base_getUserCaption()
person = portal.portal_catalog.getResultValue(
portal_type = 'Person',
reference = user_reference)
if person:
return '%s %s' % (person.getFirstName(), person.getLastName())
else:
return user_reference
<?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></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getUserName</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -233,7 +233,7 @@
.push(function () {
return jIO.util.ajax({
type: "GET",
url: new URL('./ERP5Site_getUserName', window.location.href)
url: new URL('./Base_getUserCaption', window.location.href)
});
})
.push(function (result) {
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>985.18881.59706.59153</string> </value>
<value> <string>986.21381.25290.13141</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1594905727.52</float>
<float>1598988152.37</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -94,7 +94,7 @@
.push(function () {
return jIO.util.ajax({
type: "GET",
url: new URL('./ERP5Site_getUserName', window.location.href)
url: new URL('./Base_getUserCaption', window.location.href)
});
})
.push(function (result) {
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>985.24907.61542.62720</string> </value>
<value> <string>985.24909.21409.59340</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1595267359.56</float>
<float>1598988297.19</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment