[ARVADOS] updated: 2.1.0-255-ge00aec9b3
Git user
git at public.arvados.org
Mon Jan 11 20:23:41 UTC 2021
Summary of changes:
lib/controller/localdb/login.go | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
via e00aec9b399e249b3b8c022364f2d7eb4b2d1640 (commit)
from 31e186b3a6f5f89584d50ab9e874551bcc99b674 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit e00aec9b399e249b3b8c022364f2d7eb4b2d1640
Author: Nico Cesar <nico at nicocesar.com>
Date: Mon Jan 11 15:23:02 2021 -0500
reverting changes in login.go
Arvados-DCO-1.1-Signed-off-by: Nico Cesar <nico at curii.com>
diff --git a/lib/controller/localdb/login.go b/lib/controller/localdb/login.go
index 18275bc02..4bf515fc3 100644
--- a/lib/controller/localdb/login.go
+++ b/lib/controller/localdb/login.go
@@ -13,7 +13,6 @@ import (
"net/http"
"net/url"
"strings"
- "time"
"git.arvados.org/arvados.git/lib/controller/rpc"
"git.arvados.org/arvados.git/lib/ctrlctx"
@@ -173,27 +172,13 @@ func (conn *Conn) CreateAPIClientAuthorization(ctx context.Context, rootToken st
tokensecret = tokenparts[2]
}
}
- var exp sql.NullTime
-
- err = exp.Scan(authinfo.ExpiresAt)
- if err != nil {
- return
- }
- // if
- if exp.Time.Equal(time.Time{}) {
- exp = sql.NullTime{}
- }
+ var exp sql.NullString
var scopes []byte
err = tx.QueryRowxContext(ctx, "select uuid, api_token, expires_at, scopes from api_client_authorizations where api_token=$1", tokensecret).Scan(&resp.UUID, &resp.APIToken, &exp, &scopes)
if err != nil {
return
}
-
- if exp.Time.Equal(time.Time{}) {
- resp.ExpiresAt = ""
- } else {
- resp.ExpiresAt = exp.Time.UTC().Format(time.RFC3339Nano)
- }
+ resp.ExpiresAt = exp.String
if len(scopes) > 0 {
err = json.Unmarshal(scopes, &resp.Scopes)
if err != nil {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list