OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package services | 5 package services |
6 | 6 |
7 import ( | 7 import ( |
8 "github.com/golang/protobuf/proto" | 8 "github.com/golang/protobuf/proto" |
9 "github.com/luci/luci-go/appengine/logdog/coordinator" | 9 "github.com/luci/luci-go/appengine/logdog/coordinator" |
10 "github.com/luci/luci-go/appengine/logdog/coordinator/endpoints" | 10 "github.com/luci/luci-go/appengine/logdog/coordinator/endpoints" |
(...skipping 27 matching lines...) Expand all Loading... |
38 } | 38 } |
39 | 39 |
40 // Enter a datastore namespace based on the message type
. | 40 // Enter a datastore namespace based on the message type
. |
41 // | 41 // |
42 // We use a type switch here because this is a shared de
corator. | 42 // We use a type switch here because this is a shared de
corator. |
43 if pbm, ok := req.(endpoints.ProjectBoundMessage); ok { | 43 if pbm, ok := req.(endpoints.ProjectBoundMessage); ok { |
44 project := config.ProjectName(pbm.GetMessageProj
ect()) | 44 project := config.ProjectName(pbm.GetMessageProj
ect()) |
45 log.Fields{ | 45 log.Fields{ |
46 "project": project, | 46 "project": project, |
47 }.Debugf(c, "Request is entering project namespa
ce.") | 47 }.Debugf(c, "Request is entering project namespa
ce.") |
48 » » » » if err := coordinator.WithProjectNamespaceNoAuth
(&c, project); err != nil { | 48 » » » » if err := coordinator.WithProjectNamespace(&c, p
roject, coordinator.NamespaceAccessNoAuth); err != nil { |
49 return nil, grpcutil.Internal | 49 return nil, grpcutil.Internal |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 return c, nil | 53 return c, nil |
54 }, | 54 }, |
55 } | 55 } |
56 } | 56 } |
OLD | NEW |