Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: logdog/appengine/coordinator/project.go

Issue 2575383002: Add server/cache support to gaeconfig. (Closed)
Patch Set: Un-collapse. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « logdog/appengine/coordinator/hierarchy/project.go ('k') | logdog/client/butler/bundler/bundler.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/appengine/coordinator/project.go
diff --git a/logdog/appengine/coordinator/project.go b/logdog/appengine/coordinator/project.go
index 4be26e9fb5497472e2d3f4ca79dc5c52a392a883..2e67a827eb46e31c149731a6126cd78af8ab4916 100644
--- a/logdog/appengine/coordinator/project.go
+++ b/logdog/appengine/coordinator/project.go
@@ -8,9 +8,7 @@ import (
"strings"
"github.com/luci/gae/service/info"
- log "github.com/luci/luci-go/common/logging"
"github.com/luci/luci-go/logdog/api/config/svcconfig"
- "github.com/luci/luci-go/logdog/appengine/coordinator/config"
"github.com/luci/luci-go/luci_config/common/cfgtypes"
"golang.org/x/net/context"
@@ -60,36 +58,3 @@ func CurrentProject(c context.Context) cfgtypes.ProjectName {
func CurrentProjectConfig(c context.Context) (*svcconfig.ProjectConfig, error) {
return GetServices(c).ProjectConfig(c, CurrentProject(c))
}
-
-// ActiveUserProjects returns a full list of all config service projects with
-// LogDog project configurations that the current user has READ access to.
-//
-// TODO: Load project configs and all project configs lists from datastore. Add
-// a background cron job to periodically update these lists from luci-config.
-// This should be a generic config service capability.
-func ActiveUserProjects(c context.Context) (map[cfgtypes.ProjectName]*svcconfig.ProjectConfig, error) {
- allPcfgs, err := config.AllProjectConfigs(c)
- if err != nil {
- return nil, err
- }
-
- for project, pcfg := range allPcfgs {
- // Verify user READ access.
- if err := IsProjectReader(c, pcfg); err != nil {
- delete(allPcfgs, project)
-
- // If it is a membership error, prune this project and continue.
- // Otherwise, forward the error.
- if !IsMembershipError(err) {
- // No configuration for this project, the configuration is invalid, or
- // the user didn't have access. Remove it from the list.
- log.Fields{
- log.ErrorKey: err,
- "project": project,
- }.Errorf(c, "Failed to check project.")
- return nil, err
- }
- }
- }
- return allPcfgs, nil
-}
« no previous file with comments | « logdog/appengine/coordinator/hierarchy/project.go ('k') | logdog/client/butler/bundler/bundler.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698