Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对这段代码有些疑问 #30

Open
zhengshf opened this issue Jun 2, 2015 · 0 comments
Open

对这段代码有些疑问 #30

zhengshf opened this issue Jun 2, 2015 · 0 comments

Comments

@zhengshf
Copy link

zhengshf commented Jun 2, 2015

//Determine whether need to verify
func CheckAccess(params []string) bool {

//1、跟URL长度什么关系?router中只有/public/index等4个url符合这个条件,意思是这四个都是登陆相关的操作,所以不需要做认证?
//2、这个认证不是指的登陆时候的用户名、密码的验证吧?
//3、服务部署起来后,数据库里面是空的,怎么login,会一直返回用户不存在,没有注册页面么?

if len(params) < 3 {
    return false
}
for _, nap := range strings.Split(beego.AppConfig.String("not_auth_package"), ",") {
    if params[1] == nap {
        return false
    }
}
return true

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant