Skip to content

Commit

Permalink
add root_user_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
binux committed Jul 23, 2014
1 parent 88f52c8 commit 0e9973c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/base.py
Expand Up @@ -39,7 +39,7 @@ def get_current_user(self):
"group": self.user_manager.get_group(email),
"permission": self.user_manager.get_permission(email),
}
elif self.request.remote_ip in ("localhost", "127.0.0.1"):
elif self.request.remote_ip in ("localhost", "127.0.0.1") or options.root_user_mode:
return {
"id": 0,
"email": "bot@localhost",
Expand Down
1 change: 1 addition & 0 deletions main.py
Expand Up @@ -59,6 +59,7 @@

define("google_oauth_key", default=None, help="google oauth client id")
define("google_oauth_secret", default=None, help="google oauth client secret")
define("root_user_mode", default=False, help="everyone is root")

class Application(web.Application):
def __init__(self):
Expand Down

0 comments on commit 0e9973c

Please sign in to comment.