| 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
|
| -}
|
|
|