Add filtering by bundleID to listing roles and bundles

This commit is contained in:
Benedikt Kulmann
2020-08-27 15:42:19 +02:00
parent 31cb0c951a
commit 0f9e141699
9 changed files with 507 additions and 418 deletions
+2 -2
View File
@@ -98,7 +98,7 @@ func (g Service) ListBundles(c context.Context, req *proto.ListBundlesRequest, r
if validationError := validateListBundles(req); validationError != nil {
return merrors.BadRequest(g.id, "%s", validationError)
}
bundles, err := g.manager.ListBundles(proto.Bundle_TYPE_DEFAULT)
bundles, err := g.manager.ListBundles(proto.Bundle_TYPE_DEFAULT, req.BundleIds)
if err != nil {
return merrors.NotFound(g.id, "%s", err)
}
@@ -260,7 +260,7 @@ func (g Service) ListRoles(c context.Context, req *proto.ListBundlesRequest, res
if validationError := validateListRoles(req); validationError != nil {
return merrors.BadRequest(g.id, "%s", validationError)
}
r, err := g.manager.ListBundles(proto.Bundle_TYPE_ROLE)
r, err := g.manager.ListBundles(proto.Bundle_TYPE_ROLE, req.BundleIds)
if err != nil {
return merrors.NotFound(g.id, "%s", err)
}