mirror of https://github.com/mindoc-org/mindoc.git
如果没有开启匿名访问,屏蔽搜索
parent
3e2d6bdd36
commit
096eb8edd1
|
@ -18,6 +18,12 @@ func (c *SearchController) Index() {
|
|||
c.Prepare()
|
||||
c.TplName = "search/index.tpl"
|
||||
|
||||
//如果没有开启你们访问则跳转到登录
|
||||
if !c.EnableAnonymous && c.Member == nil {
|
||||
c.Redirect(beego.URLFor("AccountController.Login"),302)
|
||||
return
|
||||
}
|
||||
|
||||
keyword := c.GetString("keyword")
|
||||
pageIndex,_ := c.GetInt("page",1)
|
||||
|
||||
|
|
Loading…
Reference in New Issue