summaryrefslogtreecommitdiffstats
path: root/modules/auth/auth.go
diff options
context:
space:
mode:
authortechknowlogick <matti@mdranta.net>2019-04-19 04:59:26 -0400
committerLauris BH <lauris@nix.lv>2019-04-19 11:59:26 +0300
commit19ec2606e91610421a3e9cd87c94748ef07ca468 (patch)
treec1898300efe5ad0bd2fa07ab3268d21804c6b5ed /modules/auth/auth.go
parentdae94e33be52ca8749421165ee662d7f1300d115 (diff)
downloadgitea-19ec2606e91610421a3e9cd87c94748ef07ca468.tar.gz
gitea-19ec2606e91610421a3e9cd87c94748ef07ca468.zip
API OTP Context (#6674)
* API OTP Context * Update api.go * token * token * fix per discord * copyright header * remove check for token in OTP * Update auth.go * simplify * Update api.go
Diffstat (limited to 'modules/auth/auth.go')
-rw-r--r--modules/auth/auth.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/auth/auth.go b/modules/auth/auth.go
index c9e5c44da5..5f6ff75dd8 100644
--- a/modules/auth/auth.go
+++ b/modules/auth/auth.go
@@ -214,9 +214,10 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool)
}
return nil, false
}
+ } else {
+ ctx.Data["IsApiToken"] = true
}
- ctx.Data["IsApiToken"] = true
return u, true
}
}