We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4117a44 commit ad39c50Copy full SHA for ad39c50
routers/private/serv.go
@@ -61,6 +61,12 @@ func ServNoCommand(ctx *macaron.Context) {
61
})
62
return
63
}
64
+ if !user.IsActive {
65
+ ctx.JSON(http.StatusForbidden, map[string]interface{}{
66
+ "err": fmt.Sprintf("Your account is unactived."),
67
+ })
68
+ return
69
+ }
70
results.Owner = user
71
72
ctx.JSON(http.StatusOK, &results)
routers/repo/http.go
@@ -244,6 +244,11 @@ func HTTP(ctx *context.Context) {
244
245
246
247
+ if !authUser.IsActive {
248
+ ctx.HandleText(http.StatusForbidden, "Your account is unactived.")
249
250
251
+
252
if repoExist {
253
perm, err := models.GetUserRepoPermission(repo, authUser)
254
if err != nil {
0 commit comments