Skip to content

Commit

Permalink
fix(core): Fix permissions for pendingSearchIndexUpdates query
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Nov 25, 2021
1 parent c90033b commit 152e64b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/api/resolvers/admin/search.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class SearchResolver {
}

@Query()
@Allow(Permission.UpdateCatalog, Permission.UpdateProduct)
@Allow(Permission.ReadCatalog, Permission.ReadProduct)
async pendingSearchIndexUpdates(...args: any[]): Promise<any> {
throw new InternalServerError(`error.no-search-plugin-configured`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class AdminFulltextSearchResolver implements BaseSearchResolver {
}

@Query()
@Allow(Permission.UpdateCatalog, Permission.UpdateProduct)
@Allow(Permission.ReadCatalog, Permission.ReadProduct)
async pendingSearchIndexUpdates(...args: any[]): Promise<any> {
return this.searchJobBufferService.getPendingSearchUpdates();
}
Expand Down

0 comments on commit 152e64b

Please sign in to comment.