Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
email
Commits
b90aeef77297
Commit
1a7b298b
authored
Jul 27, 2010
by
Sylvain Thénault
Browse files
actual_session deprecated in 3.7
parent
04cfb4415564
Changes
1
Hide whitespace changes
Inline
Side-by-side
hooks.py
View file @
b90aeef7
...
...
@@ -20,8 +20,7 @@ from cubicweb.server import hook
def
fix_ownership
(
session
,
eid
,
email
):
sender
=
email
.
senderaddr
.
email_of
if
(
sender
and
sender
.
e_schema
==
'CWUser'
and
sender
.
eid
!=
session
.
actual_session
().
user
.
eid
):
if
sender
and
sender
.
e_schema
==
'CWUser'
and
sender
.
eid
!=
session
.
user
.
eid
:
# match a user which is not the session's user, set owned_by / created_by
session
.
execute
(
'SET X owned_by U WHERE X eid %(x)s, U eid %(u)s'
,
{
'x'
:
eid
,
'u'
:
sender
.
eid
})
...
...
Write
Preview
Supports
Markdown
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