for safety image v1.0 #14

This commit is contained in:
iiuazz
2014-09-19 17:18:53 +08:00
parent c142568a56
commit 6f4ba8313c
22 changed files with 402 additions and 83 deletions

View File

@ -56,12 +56,13 @@ var commonUrl = map[string]map[string]bool{"Index": map[string]bool{"Index": tru
"User": map[string]bool{"UpdateEmail": true,
"ActiveEmail":true,
},
"oauth": map[string]bool{"githubCallback": true},
"Oauth": map[string]bool{"GithubCallback": true},
"File": map[string]bool{"OutputImage": true, "OutputFile": true},
}
func needValidate(controller, method string) bool {
// 在里面
if v, ok := commonUrl[controller]; ok {
// 在commonUrl里
// 在commonUrl里
if _, ok2 := v[method]; ok2 {
return false
}