Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Alexander Emmerich
erp5
Commits
41b6d94e
Commit
41b6d94e
authored
May 10, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into zope4py2
parents
4cc80b95
143321c2
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
122 additions
and
39 deletions
+122
-39
bt5/erp5_base/bt/template_keep_path_list
bt5/erp5_base/bt/template_keep_path_list
+1
-1
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
...rtal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
+6
-1
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/user-extensions.js.js
...Item/portal_skins/erp5_ui_test_core/user-extensions.js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_integerfield_js.js
...teItem/web_page_module/rjs_gadget_erp5_integerfield_js.js
+2
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_integerfield_js.xml
...eItem/web_page_module/rjs_gadget_erp5_integerfield_js.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.js
...TemplateItem/web_page_module/rjs_gadget_html5_input_js.js
+8
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.xml
...emplateItem/web_page_module/rjs_gadget_html5_input_js.xml
+3
-3
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderCameFromURITemplate.py
...5_web_renderjs_ui/WebSection_renderCameFromURITemplate.py
+17
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderCameFromURITemplate.xml
..._web_renderjs_ui/WebSection_renderCameFromURITemplate.xml
+62
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSite_login.py
...teItem/portal_skins/erp5_web_renderjs_ui/WebSite_login.py
+1
-12
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/login_form.zpt
...lateItem/portal_skins/erp5_web_renderjs_ui/login_form.zpt
+5
-1
product/CMFActivity/ActivityBuffer.py
product/CMFActivity/ActivityBuffer.py
+1
-1
product/CMFActivity/ActivityConnection.py
product/CMFActivity/ActivityConnection.py
+2
-2
product/DeadlockDebugger/dumper.py
product/DeadlockDebugger/dumper.py
+3
-3
product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.ContributionTool.py
...plateItem/portal_components/tool.erp5.ContributionTool.py
+1
-1
product/ERP5Security/ERP5ExternalOauth2ExtractionPlugin.py
product/ERP5Security/ERP5ExternalOauth2ExtractionPlugin.py
+1
-8
product/ERP5Type/TransactionalVariable.py
product/ERP5Type/TransactionalVariable.py
+2
-2
product/TimerService/timerserver/TimerServer.py
product/TimerService/timerserver/TimerServer.py
+3
-0
No files found.
bt5/erp5_base/bt/template_keep_path_list
View file @
41b6d94e
portal_components/document.erp5.RoundingModel
portal_components/
document
.erp5.RoundingTool
portal_components/
tool
.erp5.RoundingTool
portal_components/interface.erp5.IRoundingTool
portal_introspections
portal_memcached/persistent_memcached_plugin
...
...
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
41b6d94e
...
...
@@ -555,6 +555,11 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None,
result
.
update
({
"maxlength"
:
field
.
get_value
(
"display_maxwidth"
),
})
if
meta_type
==
"IntegerField"
:
result
.
update
({
"min"
:
field
.
get_value
(
"start"
),
"max"
:
field
.
get_value
(
"end"
),
})
if
meta_type
==
"FloatField"
:
result
.
update
({
"precision"
:
field
.
get_value
(
"precision"
),
...
...
@@ -2107,7 +2112,7 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
# Include cell error text in case of form validation
if
field_errors
.
has_key
(
'%s_%s'
%
(
editable_field
.
id
,
brain_uid
)):
contents_item
[
select
][
'field_gadget_param'
][
"error_text"
]
=
\
field_errors
[
'%s_%s'
%
(
editable_field
.
id
,
brain_uid
)].
error_text
Base_translateString
(
field_errors
[
'%s_%s'
%
(
editable_field
.
id
,
brain_uid
)].
error_text
)
# Do not generate link for empty value, as it will not be clickable in UI
...
...
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/user-extensions.js.js
View file @
41b6d94e
...
...
@@ -130,7 +130,7 @@ Selenium.prototype.assertFloatValue = function(locator, text) {
* Checks the portal status message.
*/
Selenium
.
prototype
.
assertPortalStatusMessage
=
function
(
text
)
{
var
psm_locator
=
"
//div[@id='transition_message']
"
;
var
psm_locator
=
"
css=div.transition_message
"
;
var
actualValue
=
getText
(
this
.
page
().
findElement
(
psm_locator
));
Assert
.
matches
(
text
,
actualValue
);
};
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_integerfield_js.js
View file @
41b6d94e
...
...
@@ -21,6 +21,8 @@
name
:
field_json
.
key
,
title
:
field_json
.
description
,
hidden
:
field_json
.
hidden
,
min
:
field_json
.
min
,
max
:
field_json
.
max
,
// Force calling subfield render
// as user may have modified the input value
render_timestamp
:
new
Date
().
getTime
()
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_integerfield_js.xml
View file @
41b6d94e
...
...
@@ -220,7 +220,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
valentin
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
88.26496.42040.8686
</string>
</value>
<value>
<string>
9
90.12355.17861.39304
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
16
09253348.53
</float>
<float>
16
51759968.58
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.js
View file @
41b6d94e
...
...
@@ -34,6 +34,8 @@
hidden
:
options
.
hidden
,
trim
:
options
.
trim
||
false
,
maxlength
:
options
.
maxlength
,
min
:
options
.
min
,
max
:
options
.
max
,
multiple
:
options
.
multiple
,
accept
:
options
.
accept
,
capture
:
options
.
capture
,
...
...
@@ -93,6 +95,12 @@
if
(
this
.
state
.
maxlength
)
{
textarea
.
setAttribute
(
'
maxlength
'
,
this
.
state
.
maxlength
);
}
if
(
this
.
state
.
min
!==
""
)
{
textarea
.
setAttribute
(
'
min
'
,
this
.
state
.
min
);
}
if
(
this
.
state
.
max
!==
""
)
{
textarea
.
setAttribute
(
'
max
'
,
this
.
state
.
max
);
}
if
(
this
.
state
.
multiple
)
{
textarea
.
multiple
=
true
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.xml
View file @
41b6d94e
...
...
@@ -220,7 +220,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
valentin
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
990.28219.58167.35225
</string>
</value>
<value>
<string>
1000.3604.26762.29934
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
16
14695141.57
</float>
<float>
16
51848322.15
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderCameFromURITemplate.py
0 → 100644
View file @
41b6d94e
import
re
from
ZTUtils
import
make_query
portal
=
context
.
getPortalObject
()
# XXX Hardcoded behaviour for JS app.
# Expect came_from to be an URL template
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
url_parameter
=
"n.me"
pattern
=
'{[&|?]%s}'
%
url_parameter
if
(
person
is
None
or
not
portal
.
portal_membership
.
checkPermission
(
'View'
,
person
)):
came_from
=
re
.
sub
(
pattern
,
''
,
came_from
)
else
:
prefix
=
"&"
if
"&%s"
%
url_parameter
in
came_from
else
"?"
came_from
=
re
.
sub
(
pattern
,
'%s%s'
%
(
prefix
,
make_query
({
url_parameter
:
person
.
getRelativeUrl
()})),
came_from
)
return
came_from
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderCameFromURITemplate.xml
0 → 100644
View file @
41b6d94e
<?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>
came_from
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WebSection_renderCameFromURITemplate
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSite_login.py
View file @
41b6d94e
import
re
REQUEST
=
context
.
REQUEST
RESPONSE
=
REQUEST
.
RESPONSE
from
ZTUtils
import
make_query
portal
=
context
.
getPortalObject
()
...
...
@@ -35,16 +33,7 @@ else:
# XXX How to warn user that password will expire?
# is_user_account_password_expired_expire_date = REQUEST.get('is_user_account_password_expired_expire_date', 0)
# XXX Hardcoded behaviour for JS app.
# Expect came_from to be an URL template
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
url_parameter
=
"n.me"
pattern
=
'{[&|?]%s}'
%
url_parameter
if
(
person
is
None
or
not
portal
.
portal_membership
.
checkPermission
(
'View'
,
person
)):
came_from
=
re
.
sub
(
pattern
,
''
,
came_from
)
else
:
prefix
=
"&"
if
"&%s"
%
url_parameter
in
came_from
else
"?"
came_from
=
re
.
sub
(
pattern
,
'%s%s'
%
(
prefix
,
make_query
({
url_parameter
:
person
.
getRelativeUrl
()})),
came_from
)
came_from
=
context
.
WebSection_renderCameFromURITemplate
(
came_from
)
# RESPONSE.redirect(came_from or context.getPermanentURL(context));
RESPONSE
.
setHeader
(
'Location'
,
came_from
or
context
.
getPermanentURL
(
context
))
RESPONSE
.
setStatus
(
303
)
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/login_form.zpt
View file @
41b6d94e
...
...
@@ -40,7 +40,7 @@
<section
tal:condition=
"not: portal/portal_membership/isAnonymousUser"
>
<p
i18n:domain=
"ui"
i18n:translate=
""
>
It seems you're already authenticated.
</p>
<p><a
tal:condition=
"exists: request/came_from"
tal:attributes=
"href
request/came_from
"
>
Go back
</a></p>
tal:attributes=
"href
python:context.WebSection_renderCameFromURITemplate(request.came_from)
"
>
Go back
</a></p>
</section>
<section
tal:condition=
"portal/portal_membership/isAnonymousUser"
>
...
...
@@ -81,6 +81,8 @@
<a
tal:attributes=
"href string:${current_url}/ERP5Site_redirectToFacebookLoginPage"
i18n:translate=
""
i18n:domain=
"ui"
class=
"sign_in_with_facebook"
>
<img
alt=
"Login with Facebook"
src=
"facebook_login_button.png"
>
</a>
...
...
@@ -90,6 +92,8 @@
<a
tal:attributes=
"href string:${current_url}/ERP5Site_redirectToOpenIdLoginPage"
i18n:translate=
""
i18n:domain=
"ui"
class=
"sign_in_with_openid"
>
<img
alt=
"Sign in with OpenID Connect"
src=
"openid_login_button.png"
/>
...
...
product/CMFActivity/ActivityBuffer.py
View file @
41b6d94e
...
...
@@ -76,4 +76,4 @@ class ActivityBuffer(TM):
def
sortKey
(
self
,
*
ignored
):
"""Activities must be finished before databases commit transactions."""
return
'-1'
return
-
1
product/CMFActivity/ActivityConnection.py
View file @
41b6d94e
...
...
@@ -34,7 +34,7 @@ from Acquisition import aq_parent
# If the sort order below doesn't work, we cannot guarantee the sort key
# used below will actually result in the activity connection being committed
# after the ZODB and Catalog data.
assert
'
\
x00
'
<
'-1'
<
'0'
<
'1'
<
'
\
xff
'
,
"Cannot guarantee commit of activities comes after the appropriate data"
assert
None
<
0
<
''
<
()
,
"Cannot guarantee commit of activities comes after the appropriate data"
manage_addActivityConnectionForm
=
HTMLFile
(
'dtml/connectionAdd'
,
globals
())
...
...
@@ -66,4 +66,4 @@ InitializeClass(ActivityConnection)
class
ActivityDB
(
DB
):
_sort_key
=
'
\
xff
'
_sort_key
=
(
0
,)
product/DeadlockDebugger/dumper.py
View file @
41b6d94e
...
...
@@ -23,7 +23,7 @@ ZServer hook to dump a traceback of the running python threads.
"""
import
six
import
_thread
from
six.moves
import
_thread
from
sys
import
_current_frames
from
six.moves
import
cStringIO
as
StringIO
import
traceback
...
...
@@ -37,7 +37,7 @@ def dump_threads():
Returns a string with the tracebacks.
"""
this_thread_id
=
thread
.
get_ident
()
this_thread_id
=
_
thread
.
get_ident
()
now
=
time
.
strftime
(
"%Y-%m-%d %H:%M:%S"
)
res
=
[
"Threads traceback dump at %s
\
n
"
%
now
]
for
thread_id
,
frame
in
six
.
iteritems
(
_current_frames
()):
...
...
@@ -114,7 +114,7 @@ def match(self, request):
return
1
else
:
return
0
import
six
if
six
.
PY2
:
from
ZServer.HTTPServer
import
zhttp_handler
zhttp_handler
.
match
=
match
product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.ContributionTool.py
View file @
41b6d94e
...
...
@@ -655,7 +655,7 @@ class ContributionTool(BaseTool):
# Create a file name based on the URL and quote it
filename
=
urllib
.
parse
.
urlsplit
(
url
)[
-
3
]
filename
=
os
.
path
.
basename
(
filename
)
filename
=
urllib
.
parse
.
quote
(
filename
,
safe
=
''
)
filename
=
urllib
.
parse
.
quote
(
filename
,
safe
=
''
)
# pylint:disable=redundant-keyword-arg
filename
=
filename
.
replace
(
'%'
,
''
)
content_type
=
header_info
.
gettype
()
return
file_object
,
filename
,
content_type
...
...
product/ERP5Security/ERP5ExternalOauth2ExtractionPlugin.py
View file @
41b6d94e
...
...
@@ -39,7 +39,6 @@ from AccessControl.SecurityManagement import getSecurityManager, \
setSecurityManager
,
newSecurityManager
from
Products.ERP5Type.Cache
import
DEFAULT_CACHE_SCOPE
import
time
import
socket
from
six.moves
import
urllib
import
json
from
zLOG
import
LOG
,
ERROR
,
INFO
...
...
@@ -234,14 +233,8 @@ def getFacebookUserEntry(token):
'No facebook module, install facebook-sdk package. '
'Authentication disabled.'
)
return
None
timeout
=
socket
.
getdefaulttimeout
()
args
=
{
'fields'
:
'id,name,email'
,
}
try
:
# require really fast interaction
socket
.
setdefaulttimeout
(
5
)
facebook_entry
=
facebook
.
GraphAPI
(
token
).
get_object
(
"me"
,
**
args
)
finally
:
socket
.
setdefaulttimeout
(
timeout
)
facebook_entry
=
facebook
.
GraphAPI
(
token
,
timeout
=
5
).
get_object
(
"me"
,
**
args
)
user_entry
=
{}
if
facebook_entry
is
not
None
:
...
...
product/ERP5Type/TransactionalVariable.py
View file @
41b6d94e
...
...
@@ -70,7 +70,7 @@ class TransactionalVariable(dict):
_unregistered
=
True
def
sortKey
(
self
):
return
'
\
x00
'
return
None
commit
=
tpc_vote
=
tpc_begin
=
tpc_abort
=
lambda
self
,
transaction
:
None
...
...
@@ -127,7 +127,7 @@ class TransactionalResource(object):
return
not
(
args
in
tv
or
tv
.
add
(
args
))
def
sortKey
(
self
):
return
'1'
return
1
abort
=
commit
=
tpc_vote
=
tpc_begin
=
tpc_finish
=
tpc_abort
=
\
lambda
self
,
transaction
:
None
product/TimerService/timerserver/TimerServer.py
View file @
41b6d94e
...
...
@@ -125,6 +125,9 @@ class TimerResponse(BaseResponse):
def
_finish
(
self
):
pass
def
redirect
(
self
,
*
args
,
**
kw
):
pass
def
unauthorized
(
self
):
pass
...
...
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