search-common: add optional resourceRef field to IndexableDocument type
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/search-common': patch
|
||||
---
|
||||
|
||||
Add optional resourceRef field to the IndexableDocument type for use when authorizing access to documents.
|
||||
@@ -27,6 +27,9 @@ export interface DocumentDecorator {
|
||||
//
|
||||
// @public
|
||||
export interface IndexableDocument {
|
||||
authorization?: {
|
||||
resourceRef: string;
|
||||
};
|
||||
location: string;
|
||||
text: string;
|
||||
title: string;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user