Chromium Code Reviews| Index: milo/appengine/buildbot/master.go |
| diff --git a/milo/appengine/buildbot/master.go b/milo/appengine/buildbot/master.go |
| index a31cf96fcec93116d35ee2c3fdb35f783fdc9ac3..5f1990cf538e31cccd990450c3ad73996f7678eb 100644 |
| --- a/milo/appengine/buildbot/master.go |
| +++ b/milo/appengine/buildbot/master.go |
| @@ -60,8 +60,6 @@ func GetAllBuilders(c context.Context) (*resp.Module, error) { |
| // Fetch all Master entries from datastore |
| ds := datastore.Get(c) |
| q := datastore.NewQuery("buildbotMasterEntry") |
| - // TODO(hinoka): Support internal queries. |
| - q = q.Eq("Internal", false) |
| // TODO(hinoka): Maybe don't look past like a month or so? |
| entries := []*buildbotMasterEntry{} |
| err := ds.GetAll(q, &entries) |
| @@ -72,6 +70,13 @@ func GetAllBuilders(c context.Context) (*resp.Module, error) { |
| // Add each builder from each master entry into the result. |
| // TODO(hinoka): FanInOut this? |
| for _, entry := range entries { |
| + if entry.Internal { |
| + // Bypass the master if it's an internal master and the user is not |
| + // part of the buildbot-private project. |
| + if !settings.IsAllowed(c, "buildbot-private") { |
|
Vadim Sh.
2016/08/23 18:53:06
errors like this is why its better to deduplicate
Ryan Tseng
2016/08/23 22:00:15
doh
|
| + continue |
| + } |
| + } |
| master := &buildbotMaster{} |
| err = decodeMasterEntry(c, entry, master) |
| if err != nil { |
| @@ -79,7 +84,6 @@ func GetAllBuilders(c context.Context) (*resp.Module, error) { |
| continue |
| } |
| ml := resp.MasterListing{Name: entry.Name} |
| - // TODO(hinoka): Sort |
| // Sort the builder listing. |
| sb := make([]string, 0, len(master.Builders)) |
| for bn := range master.Builders { |