search-common: add optional resourceRef field to IndexableDocument type

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
MT Lewis
2022-01-17 17:46:07 +00:00
parent 2d96be2810
commit b2e918fa0b
3 changed files with 19 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/search-common': patch
---
Add optional resourceRef field to the IndexableDocument type for use when authorizing access to documents.
+3
View File
@@ -27,6 +27,9 @@ export interface DocumentDecorator {
//
// @public
export interface IndexableDocument {
authorization?: {
resourceRef: string;
};
location: string;
text: string;
title: string;
+11
View File
@@ -53,6 +53,17 @@ export interface IndexableDocument {
* is clicked).
*/
location: string;
/**
* Optional authorization information to be used when determining whether this
* search result should be visible to a given user.
*/
authorization?: {
/**
* Identifier for the resource.
*/
resourceRef: string;
};
}
/**