refined redirection when user logined.

This commit is contained in:
wknet123 2016-02-25 11:18:40 +08:00
parent 386de12444
commit bfd96c9373
1 changed files with 4 additions and 2 deletions

View File

@ -67,8 +67,10 @@ func (idc *ItemDetailController) Get() {
}
if project.Public == 0 && len(roleList) == 0 {
idc.Redirect("/signIn?uri="+url.QueryEscape(idc.Ctx.Input.URI()), http.StatusFound)
} else if len(roleList) > 0 {
idc.Redirect("/registry/project", http.StatusFound)
}
if len(roleList) > 0 {
idc.Data["RoleId"] = roleList[0].RoleId
}
}