admin username & jsonp fixed

This commit is contained in:
life
2014-10-23 10:45:03 +08:00
parent 536c5de56a
commit b0b304d5dd
4 changed files with 21 additions and 20 deletions

View File

@ -53,8 +53,7 @@ func (c Note) Index() revel.Result {
// 当然, 还需要得到第一个notes的content
//...
adminUsername, _ := revel.Config.String("adminUsername")
c.RenderArgs["isAdmin"] = adminUsername == userInfo.Username
c.RenderArgs["isAdmin"] = leanoteUserId == userInfo.Username
c.RenderArgs["userInfo"] = userInfo
c.RenderArgs["userInfoJson"] = c.Json(userInfo)
c.RenderArgs["notebooks"] = c.Json(notebooks)