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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
430596e5
Commit
430596e5
authored
Dec 20, 2016
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Site_getAuthenticatedMemberPersonValue: Deprecate
And simplify.
parent
a6e5d03d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_getAuthenticatedMemberPersonValue.py
...s/erp5_base/ERP5Site_getAuthenticatedMemberPersonValue.py
+5
-10
No files found.
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_getAuthenticatedMemberPersonValue.py
View file @
430596e5
"""Find and returns Person object for current logged in user.
"""Find and returns Person object for current logged in user.
Returns None if no corresponding person, for example when not using ERP5Security.ERP5UserManager.
Returns None if no corresponding person, for example when not using ERP5Security.ERP5UserManager.
"""
"""
portal
=
context
.
getPortalObject
()
from
Products.ERP5Type.Log
import
log
if
user_name
is
None
:
if
user_name
is
None
:
return
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
log
(
'DEPRECATED: call context.getPortalObject().portal_membership.getAuthenticatedMember().getUserValue()'
)
user_path_set
=
{
return
context
.
getPortalObject
().
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
x
[
'path'
]
log
(
'DEPRECATED: call context.Base_getUserValueByUserId(user_name)'
)
for
x
in
portal
.
acl_users
.
searchUsers
(
exact_match
=
True
,
id
=
user_name
)
return
context
.
Base_getUserValueByUserId
(
user_name
)
if
'path'
in
x
}
if
len
(
user_path_set
)
==
1
:
user_path
,
=
user_path_set
return
portal
.
restrictedTraverse
(
user_path
)
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