siteurl, adminUsername config in configService
This commit is contained in:
@ -183,7 +183,7 @@ func (c BaseController) SetLocale() string {
|
||||
lang = "en";
|
||||
}
|
||||
c.RenderArgs["locale"] = lang;
|
||||
c.RenderArgs["siteUrl"] = siteUrl;
|
||||
c.RenderArgs["siteUrl"] = configService.GetSiteUrl();
|
||||
|
||||
c.RenderArgs["blogUrl"] = configService.GetBlogUrl()
|
||||
c.RenderArgs["leaUrl"] = configService.GetLeaUrl()
|
||||
@ -196,7 +196,7 @@ func (c BaseController) SetLocale() string {
|
||||
func (c BaseController) SetUserInfo() {
|
||||
userInfo := c.GetUserInfo()
|
||||
c.RenderArgs["userInfo"] = userInfo
|
||||
if(userInfo.Username == adminUsername) {
|
||||
if(userInfo.Username == configService.GetAdminUsername()) {
|
||||
c.RenderArgs["isAdmin"] = true
|
||||
}
|
||||
}
|
||||
@ -242,4 +242,4 @@ func (c BaseController) RenderRe(re info.Re) revel.Result {
|
||||
}
|
||||
}
|
||||
return c.RenderJson(re)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user