erp5_core: Improve BaseExtensibleTraversableMixin._forceIdentification
Fix bugs: - Fix an acquisition context bug: the user found here would be wrapped in the acquisition context of self, and as a result SecurityManager.validate may consider the user to be outside of the acquisition path of the document being checked (ex: when accessing a module while publishing a web section). - While unusual, there may be multiple users matching a given request, which is handled by ZPublisher but was skipped here. Also: Document: - Why this method is needed. - assumptions made to get simpler code. Improve performance: - portal_membership._huntUser looks the user up twice, which is expensive. Stop using this method. - When the request is a fake request (from restrictedTraverse) nothing can nor should be done, so bypass the entire logic that case. - Assorted tiny improvements: do not retrieve security manager twice, avoid extraneous local assignments, ... Improve coding style: - Stop accessing portal_membership's underware. - Stop accessing PluggableAuthenticationService's underware. - Simplify disabled cache support: this is exceedingly rare, optimise for when it is enabled. - Do not hardcode log level, also increase the severity: this really is a warning. - Do not try to decode Basic-auth, this is the job of the user folder. This removes duplicated code.
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
External | |||||||||
passed |
#736635
external
|
ERP5.CodingStyleTest-Master |
01:12:48
|
||||||
passed |
#738254
external
|
ERP5.CodingStyleTest-TestRunner3 |
15:59:22
|
||||||
failed |
#736644
external
|
ERP5.PerformanceTest-Master |
00:42:50
|
||||||
failed |
#736636
external
|
ERP5.UnitTest-Master |
02:52:05
|
||||||
passed |
#738422
external
|
ERP5.UnitTest-TestRunner3 |
02:54:32
|
||||||
passed |
#736661
external
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:27:37
|
||||||
passed |
#736647
external
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:29:45
|
||||||
passed |
#736652
external
|
Wendelin.UnitTest-Master |
00:52:05
|
||||||
passed |
#737363
external
retried
|
ERP5.CodingStyleTest-TestRunner3 |
10:44:06
|
||||||
passed |
#736628
external
retried
|
ERP5.CodingStyleTest-TestRunner3 |
01:14:08
|
||||||
failed |
#738421
external
retried
|
ERP5.UnitTest-TestRunner3 |
|
||||||
passed |
#738255
external
retried
|
ERP5.UnitTest-TestRunner3 |
12:34:06
|
||||||
passed |
#737370
external
retried
|
ERP5.UnitTest-TestRunner3 |
09:45:59
|
||||||
passed |
#736629
external
retried
|
ERP5.UnitTest-TestRunner3 |
02:13:12
|
||||||