admin username & jsonp fixed

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

No files matched your search

+1 -2
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)