Skip to content

Commit

Permalink
fix: fetch up to 1000 permissions and users
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthlatest committed Mar 3, 2020
1 parent 1d5a118 commit ed3f219
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/permissions/dao_es6.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (es *elasticsearch) getRawOwnerPermissionsEs6(ctx context.Context, owner st
resp, err := util.GetClient6().Search().
Index(es.indexName).
Query(es6.NewTermQuery("owner.keyword", owner)).
Size(100).
Size(1000).
Do(ctx)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion plugins/permissions/dao_es7.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (es *elasticsearch) getRawOwnerPermissionsEs7(ctx context.Context, owner st
resp, err := util.GetClient7().Search().
Index(es.indexName).
Query(es7.NewTermQuery("owner.keyword", owner)).
Size(100).
Size(1000).
Do(ctx)
if err != nil {
return nil, err
Expand Down
1 change: 1 addition & 0 deletions plugins/users/dao_es6.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
func (es *elasticsearch) getRawUsersEs6(ctx context.Context) ([]byte, error) {
response, err := util.GetClient6().Search().
Index(es.indexName).
Size(1000).
Do(ctx)

if err != nil {
Expand Down
1 change: 1 addition & 0 deletions plugins/users/dao_es7.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
func (es *elasticsearch) getRawUsersEs7(ctx context.Context) ([]byte, error) {
response, err := util.GetClient7().Search().
Index(es.indexName).
Size(1000).
Do(ctx)

if err != nil {
Expand Down

0 comments on commit ed3f219

Please sign in to comment.