aboutsummaryrefslogtreecommitdiffstats
path: root/models/token.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2015-02-07 15:47:23 -0500
committerUnknwon <joe2010xtmf@163.com>2015-02-07 15:47:23 -0500
commitba77a3b0b4bfcc418301c5069d9dd57d05ea23c3 (patch)
tree625657f26312c2018ca3a56fb66cc54fc5c9053a /models/token.go
parent19525abfc47283ad9dfdb130360869191f07a2e2 (diff)
downloadgitea-ba77a3b0b4bfcc418301c5069d9dd57d05ea23c3.tar.gz
gitea-ba77a3b0b4bfcc418301c5069d9dd57d05ea23c3.zip
routers/repo/http.go: allow HTTP push/pull by token for #845
Diffstat (limited to 'models/token.go')
-rw-r--r--models/token.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/models/token.go b/models/token.go
index 9ad2d05174..909d05e072 100644
--- a/models/token.go
+++ b/models/token.go
@@ -62,21 +62,6 @@ func ListAccessTokens(uid int64) ([]*AccessToken, error) {
return tokens, nil
}
-// ListAllAccessTokens returns all access tokens
-func ListAllAccessTokens() ([]*AccessToken, error) {
- tokens := make([]*AccessToken, 0, 5)
- err := x.Desc("id").Find(&tokens)
- if err != nil {
- return nil, err
- }
-
- for _, t := range tokens {
- t.HasUsed = t.Updated.After(t.Created)
- t.HasRecentActivity = t.Updated.Add(7 * 24 * time.Hour).After(time.Now())
- }
- return tokens, nil
-}
-
// DeleteAccessTokenById deletes access token by given ID.
func DeleteAccessTokenById(id int64) error {
_, err := x.Id(id).Delete(new(AccessToken))