Add github organizations support

This commit is contained in:
Indrek Juhkam
2015-05-23 17:06:51 +03:00
parent 57bacb339c
commit b55d9350e7
4 changed files with 112 additions and 29 deletions

View File

@@ -48,6 +48,8 @@ func OAuthLogin(ctx *middleware.Context) {
if err != nil {
if err == social.ErrMissingTeamMembership {
ctx.Redirect(setting.AppSubUrl + "/login?failedMsg=" + url.QueryEscape("Required Github team membership not fulfilled"))
} else if err == social.ErrMissingOrganizationMembership {
ctx.Redirect(setting.AppSubUrl + "/login?failedMsg=" + url.QueryEscape("Required Github organization membership not fulfilled"))
} else {
ctx.Handle(500, fmt.Sprintf("login.OAuthLogin(get info from %s)", name), err)
}