修正:普通用户无法打开个人中心页面。

pull/32/merge v2.2.10.1
Apex Liu 2017-06-07 15:04:30 +08:00
parent 9b353f89c8
commit f3e1b1e207
2 changed files with 5 additions and 3 deletions

View File

@ -6,7 +6,7 @@ from eom_app.app.configs import app_cfg
from eom_app.module import host
from eom_app.module import user
from eom_common.eomcore.logger import *
from .base import TPBaseUserAuthJsonHandler, TPBaseAdminAuthHandler, TPBaseAdminAuthJsonHandler
from .base import TPBaseUserAuthHandler, TPBaseUserAuthJsonHandler, TPBaseAdminAuthHandler, TPBaseAdminAuthJsonHandler
cfg = app_cfg()
@ -16,7 +16,7 @@ class IndexHandler(TPBaseAdminAuthHandler):
self.render('user/index.mako')
class PersonalHandler(TPBaseAdminAuthHandler):
class PersonalHandler(TPBaseUserAuthHandler):
def get(self):
user_info = self.get_current_user()
self.render('user/personal.mako', user=user_info)

View File

@ -61,7 +61,9 @@ def verify_oath(user_id, oath_code):
if len(db_ret) != 1:
return False
oath_secret = db_ret[0][0]
oath_secret = str(db_ret[0][0]).strip()
if 0 == len(oath_secret):
return False
return verify_oath_code(oath_secret, oath_code)