Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

switch to allow all admin users to see profiler tab.

  • Loading branch information...
commit 4c3e331f4c0b60fc9ff164af1e8761784966c489 1 parent f1397ed
@darktable darktable authored
Showing with 8 additions and 1 deletion.
  1. +1 −0  .gitignore
  2. +6 −0 config.py
  3. +1 −1  templates/includes.html
View
1  .gitignore
@@ -0,0 +1 @@
+*.pyc
View
6 config.py
@@ -7,8 +7,14 @@
"test1@example.com",
]
+enable_profiler_admins = True
+
# Customize should_profile to return true whenever a request should be profiled.
# This function will be run once per request, so make sure its contents are fast.
def should_profile(environ):
user = users.get_current_user()
+
+ if enable_profiler_admins and users.is_current_user_admin():
+ return True
+
return user and user.email() in enabled_profiler_emails
View
2  templates/includes.html
@@ -1,3 +1,3 @@
<link rel="stylesheet" type="text/css" href="{{ css_path|escape }}" />
<script type="text/javascript" src="{{ js_path|escape }}"></script>
-<script type="text/javascript">GaeMiniProfiler.init({{ request_id_js|safe }}, {{ show_immediately_js }})</script>
+<script type="text/javascript">GaeMiniProfiler.init("{{ request_id }}", {{ show_immediately_js }})</script>
Please sign in to comment.
Something went wrong with that request. Please try again.