Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
08cd4e1e
Commit
08cd4e1e
authored
Apr 27, 2015
by
Mathieu Giraud
Committed by
Vidjil Team
Apr 27, 2015
Browse files
models/db.py: logging, add 'team' flag when impersonating
parent
6b3ff6ed
Changes
1
Show whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/models/db.py
View file @
08cd4e1e
...
...
@@ -211,7 +211,11 @@ class MsgUserAdapter(logging.LoggerAdapter):
for
ip_prefix
in
ips
:
if
ip
.
startswith
(
ip_prefix
):
ip
=
"%s/%s"
%
(
ip
,
ips
[
ip_prefix
])
new_msg
=
'%30s %12s %s'
%
(
ip
,
(
'<%s>'
%
auth
.
user
.
first_name
.
replace
(
' '
,
'-'
)
if
auth
.
user
else
''
),
msg
)
usern
=
auth
.
user
.
first_name
.
replace
(
' '
,
'-'
)
if
auth
.
user
else
''
if
auth
.
is_impersonating
():
usern
=
'team!'
+
usern
new_msg
=
'%30s %12s %s'
%
(
ip
,
(
'<%s>'
%
usern
),
msg
)
return
new_msg
,
kwargs
def
admin
(
self
,
msg
):
...
...
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