permission-common: use createCondition helper when creating conditions
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
committed by
Joe Porpeglia
parent
899d38ea68
commit
ada4446733
@@ -30,6 +30,7 @@ import { Logger } from 'winston';
|
||||
import pLimit from 'p-limit';
|
||||
import { Config } from '@backstage/config';
|
||||
import { catalogEntityReadPermission } from '@backstage/plugin-catalog-common';
|
||||
import { Permission } from '@backstage/plugin-permission-common';
|
||||
import {
|
||||
CatalogApi,
|
||||
CatalogClient,
|
||||
@@ -73,7 +74,8 @@ type EntityInfo = {
|
||||
*/
|
||||
export class DefaultTechDocsCollator {
|
||||
public readonly type: string = 'techdocs';
|
||||
public readonly visibilityPermission = catalogEntityReadPermission;
|
||||
public readonly visibilityPermission: Permission =
|
||||
catalogEntityReadPermission;
|
||||
|
||||
private constructor(
|
||||
private readonly legacyPathCasing: boolean,
|
||||
|
||||
@@ -31,6 +31,7 @@ import {
|
||||
} from '@backstage/catalog-model';
|
||||
import { Config } from '@backstage/config';
|
||||
import { catalogEntityReadPermission } from '@backstage/plugin-catalog-common';
|
||||
import { Permission } from '@backstage/plugin-permission-common';
|
||||
import { DocumentCollatorFactory } from '@backstage/plugin-search-common';
|
||||
import { TechDocsDocument } from '@backstage/plugin-techdocs-node';
|
||||
import unescape from 'lodash/unescape';
|
||||
@@ -74,7 +75,8 @@ type EntityInfo = {
|
||||
*/
|
||||
export class DefaultTechDocsCollatorFactory implements DocumentCollatorFactory {
|
||||
public readonly type: string = 'techdocs';
|
||||
public readonly visibilityPermission = catalogEntityReadPermission;
|
||||
public readonly visibilityPermission: Permission =
|
||||
catalogEntityReadPermission;
|
||||
|
||||
private discovery: PluginEndpointDiscovery;
|
||||
private locationTemplate: string;
|
||||
|
||||
Reference in New Issue
Block a user